         guard let inputNode = input else {
             return
         }
-
+        input?.connect(to: inputMixer)
         var inputsConnectionPoints = inputNode.connectionPoints
-        inputsConnectionPoints.append(AVAudioConnectionPoint(node: environmentNode,
-                                                             bus: environmentNode.numberOfInputs))
+        inputsConnectionPoints.append(AVAudioConnectionPoint(node: inputMixer.avAudioNode,
+                                                             bus: inputMixer.nextInput.bus))
 
         let format = AVAudioFormat(standardFormatWithSampleRate: AKSettings.sampleRate, channels: 1)
 
         AudioKit.engine.connect(inputNode.avAudioNode, to: inputsConnectionPoints, fromBus: 0, format: format)
     }
-
+    public var inputNode: AVAudioNode {
+        return inputMixer.avAudioNode
+    }
+    open override func detach() {
+        AudioKit.detach(nodes: [environmentNode, inputMixer.avAudioNode])
+    }
 }

        }
    }

    /// Initialize the panner node
    ///
    /// - Parameters:

    ///   - y:     y-axis location in meters
    ///   - z:     z-axis location in meters
    ///
    public init(_ input: AKNode? = nil, x: Double = 0, y: Double = 0, z: Double = 0) {
        self.x = x
        self.y = y
        self.z = z
