Contents

connectMIDI(_:to:format:block:)

Establishes a MIDI-only connection between two nodes.

Declaration

func connectMIDI(_ sourceNode: AVAudioNode, to destinationNode: AVAudioNode, format: AVAudioFormat?, block tapBlock: AUMIDIOutputEventBlock? = nil)

Parameters

  • sourceNode:

    The source node.

  • destinationNode:

    The destination node.

  • format:

    If not NULL, the engine uses this value for the format of the source audio node’s output bus. In all cases, the engine matches the format of the destination audio node’s input bus to the source audio node’s output bus.

  • tapBlock:

    If not NULL, the source node’s Aumidioutputeventblock calls this block on the real-time thread. The host can tap the MIDI data of the source node through this block.

See Also

Managing MIDI Nodes