MIKMIDIClientDestinationEndpoint
Objective-C
@interface MIKMIDIClientDestinationEndpoint : MIKMIDIDestinationEndpoint
Swift
class MIKMIDIClientDestinationEndpoint : MIKMIDIDestinationEndpoint
MIKMIDIClientDestinationEndpoint represents a virtual endpoint created by your application to receive MIDI
from other applications on the system.
Instances of this class will be visible and can be connected to by other applications.
-
Initializes a new virtual destination endpoint.
This is essentially equivalent to creating a Core MIDI destination endpoint using MIDIDestinationCreate(). Destination endpoints created using this method can be used by your application to receive MIDI rather than send it. They can be seen and connected to by other applications on the system.
Note
On iOS, in order to create MIKMIDIClientDestinationEndpoint instances, your app must include the ‘audio’ key in its UIBackgroundModes in its Info.plist. Please see https://github.com/mixedinkey-opensource/MIKMIDI/wiki/Adding-Audio-to-UIBackgroundModes .
Declaration
Objective-C
- (nullable instancetype)initWithName:(nonnull NSString *)name receivedMessagesHandler: (nullable MIKMIDIClientDestinationEndpointEventHandler) handler;
Swift
init?(name: String, receivedMessagesHandler handler: MIKMIDIClientDestinationEndpointEventHandler? = nil)
Parameters
name
A name for the new virtual endpoint.
handler
A block to be called when the endpoint receives MIDI messages.
Return Value
An instance of MIKMIDIClientDestinationEndpoint, or nil if an error occurs.
-
A block to be called when the receiver receives new incoming MIDI messages.
Declaration
Objective-C
@property (nonatomic, strong, nullable) MIKMIDIClientDestinationEndpointEventHandler receivedMessagesHandler;
Swift
var receivedMessagesHandler: MIKMIDIClientDestinationEndpointEventHandler? { get set }