ABMIDIFilterPort.h File Reference
#import <Audiobus/ABMIDIPort.h>

Classes

class  ABMIDIFilterPort
 ABMIDIFilterPort transforms MIDI messages. More...
 

Typedefs

typedef void(^ ABMIDIFilterPortMIDIReceiverBlock )(__unsafe_unretained ABPort *_Nonnull source, const MIDIPacketList *_Nonnull packetList)
 Block to handle incoming MIDI messages.
 
typedef void(^ ABMIDIFilterPortMIDIFlushEventBlock )(__unsafe_unretained ABPort *_Nonnull source)
 Block to handle MIDI flush events.
 
typedef void(^ ABMIDIFilterPortInstanceConnectionBlock )(ABMIDIFilterPort *_Nonnull instance)
 Block to handle instance connection or disconnection.
 

Typedef Documentation

typedef void(^ ABMIDIFilterPortMIDIReceiverBlock)(__unsafe_unretained ABPort *_Nonnull source, const MIDIPacketList *_Nonnull packetList)

Block to handle incoming MIDI messages.

Upon receiving MIDI messages, a MIDI Filter port should generate new MIDIPacketLists as required, and then send them on using ABMIDIPortSendPacketList.

Note: this will be called on the realtime MIDI receive thread, so be careful not to do anything that could cause priority inversion, like calling Objective-C, allocating memory, or holding locks.

Parameters
sourceThe source port
packetListThe MIDI packets
typedef void(^ ABMIDIFilterPortMIDIFlushEventBlock)(__unsafe_unretained ABPort *_Nonnull source)

Block to handle MIDI flush events.

See ABMIDIFilterPort's [MIDIFlushEventBlock](ABMIDIFilterPort::MIDIFlushEventBlock) documentation for details.

Note: this will be called on the realtime MIDI receive thread, so be careful not to do anything that could cause priority inversion, like calling Objective-C, allocating memory, or holding locks.

Parameters
sourceThe source port
typedef void(^ ABMIDIFilterPortInstanceConnectionBlock)(ABMIDIFilterPort *_Nonnull instance)

Block to handle instance connection or disconnection.

Use this with the multi-instance port initializer. It will be called on the main thread. You may assign a new MIDIReceiverBlock value for the new instance when this block is called, and it will replace the one you provided to the ABMIDIFilterPort initializer.

Parameters
instanceThe instance