         AudioKit.connect(outputNode, to: node.inputNode, fromBus: 0, toBus: bus, format: format)
         return node
     }
-    
+
     /// Sets output connections to an array of inputs, removes previously existing output connections.
     ///   - Parameter nodes: Inputs that output will be connected to.
     ///   - Parameter format: The format of the connections.

        connectionPoints += nodes.map { $0.nextInput }.map { $0.avConnection }
        return nodes
    }
    
    /// Add an output connection to each connectionPoint in toInputs.
    ///   - Parameter toInputs: Inputs that will be connected to.
    @discardableResult public func connect(toInputs: [AKInputConnection]) -> [AKInput] {
        connectionPoints += toInputs.map { $0.avConnection }
        return toInputs.map { $0.node }
    }
    
    /// Add an output connectionPoint.
    ///   - Parameter connectionPoint: Input that will be connected to.
    public func connect(to connectionPoint: AVAudioConnectionPoint) {


/// Manages connections to inputNode.
public protocol AKInput: AKOutput {

    /// The node that an output's node can connect to.  Default implementation will return outputNode.
    var inputNode: AVAudioNode { get }

    /// The input bus that should be used for an input connection.  Default implementation is 0.  Multi-input nodes
    /// should return an open bus.
    ///
    ///   - Returns: An inputConnection object conatining self and the input bus to use for an input connection.
    var nextInput: AKInputConnection { get }

    /// Disconnects all inputs
    func disconnectInput()

    /// Disconnects input on a bus.
    func disconnectInput(bus: Int)

    /// Creates an input connection object with a bus number.
    ///   - Returns: An inputConnection object conatining self and the input bus to use for an input connection.
    func input(_ bus: Int) -> AKInputConnection
