Contents

MIDIReadProc

A function receiving MIDI input.

Declaration

typealias MIDIReadProc = (UnsafePointer<MIDIPacketList>, UnsafeMutableRawPointer?, UnsafeMutableRawPointer?) -> Void

Parameters

  • pktlist:

    The incoming MIDI message(s).

  • readProcRefCon:

    The refCon you passed to MIDIInputPortCreate or MIDIDestinationCreate

  • srcConnRefCon:

    A refCon you passed to MIDIPortConnectSource, which identifies the source of the data.

Discussion

This is a callback function through which a client receives incoming MIDI messages.

A MIDIReadProc function pointer is passed to the MIDIInputPortCreate and MIDIDestinationCreate functions. The CoreMIDI framework will create a high-priority receive thread on your client’s behalf, and from that thread, your MIDIReadProc will be called when incoming MIDI messages arrive.

See Also

Deprecated Functions