MIKMIDIClientSourceEndpoint
Objective-C
@interface MIKMIDIClientSourceEndpoint : MIKMIDISourceEndpoint
Swift
class MIKMIDIClientSourceEndpoint : MIKMIDISourceEndpoint
MIKMIDIClientSourceEndpoint represents a virtual endpoint created by your application to send MIDI
to other applications on the system.
Instances of this class will be visible and can be connected to by other applications.
-
Initializes a new virtual source endpoint.
This is essentially equivalent to creating a Core MIDI source endpoint using MIDISourceCreate(). Source endpoints created using this method can be used by your application to send MIDI rather than receive it. They can be seen and connected to by other applications on the system.
Declaration
Objective-C
- (nonnull instancetype)initWithName:(nonnull NSString *)name error:(NSError *_Nullable *_Nullable)error;
Swift
init(name: String, error: NSErrorPointer)
Parameters
name
A name for the new virtual endpoint.
error
If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
Return Value
An instance of MIKMIDIClientSourceEndpoint, or nil if an error occurs.
-
Used to send MIDI messages/commands from your application to a MIDI output endpoint. Use this to send messages to a virtual MIDI port created in the your client using the MIKMIDIClientSourceEndpoint class.
Declaration
Objective-C
- (BOOL)sendCommands:(nonnull NSArray<MIKMIDICommand *> *)commands error:(NSError *_Nullable *_Nullable)error;
Swift
func send(_ commands: [MIKMIDICommand]) throws
Parameters
commands
An NSArray containing MIKMIDICommand instances to be sent.
error
If an error occurs, upon returns contains an NSError object that describes the problem. If you are not interested in possible errors, you may pass in NULL.
Return Value
YES if the commands were successfully sent, NO if an error occurred.
-
Deprecated
@deprecated Use -initWithName:error: instead.
Initializes a new virtual source endpoint.
This is essentially equivalent to creating a Core MIDI source endpoint using MIDISourceCreate(). Source endpoints created using this method can be used by your application to send MIDI rather than receive it. They can be seen and connected to by other applications on the system.
Declaration
Objective-C
- (nullable instancetype)initWithName:(nonnull NSString *)name;
Swift
init?(name: String)
Parameters
name
A name for the new virtual endpoint.
Return Value
An instance of MIKMIDIClientSourceEndpoint, or nil if an error occurs.