MIKMIDIEndpointSynthesizer
Objective-C
@interface MIKMIDIEndpointSynthesizer : MIKMIDISynthesizer
Swift
class MIKMIDIEndpointSynthesizer : MIKMIDISynthesizer
MIKMIDIEndpointSynthesizer is a subclass of MIKMIDISynthesizer that provides a very simple way to synthesize MIDI commands coming from a MIDI endpoint (e.g. from a connected MIDI piano keyboard) to produce sound output.
To use it, simply create a synthesizer instance with the source you’d like it to play. It will continue playing incoming MIDI until it is deallocated.
See
MIKMIDISynthesizer-
Creates and initializes an MIKMIDIEndpointSynthesizer instance using Apple’s DLS synth as the underlying instrument.
Declaration
Objective-C
+ (nullable instancetype) playerWithMIDISource:(nonnull MIKMIDISourceEndpoint *)source error:(NSError *_Nullable *_Nullable)error;
Swift
class func player(withMIDISource source: MIKMIDISourceEndpoint, error: ()) throws -> Self
Parameters
source
An MIKMIDISourceEndpoint instance from which MIDI note events will be received.
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 initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Creates and initializes an MIKMIDIEndpointSynthesizer instance.
Declaration
Objective-C
+ (nullable instancetype) playerWithMIDISource:(nonnull MIKMIDISourceEndpoint *)source componentDescription:(AudioComponentDescription)componentDescription error:(NSError *_Nullable *_Nullable)error;
Swift
class func player(withMIDISource source: MIKMIDISourceEndpoint, componentDescription: AudioComponentDescription, error: ()) throws -> Self
Parameters
source
An MIKMIDISourceEndpoint instance from which MIDI note events will be received.
componentDescription
an AudioComponentDescription describing the Audio Unit instrument you would like the synthesizer to use.
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 initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Initializes an MIKMIDIEndpointSynthesizer instance using Apple’s DLS synth as the underlying instrument.
Declaration
Objective-C
- (nullable instancetype) initWithMIDISource:(nonnull MIKMIDISourceEndpoint *)source error:(NSError *_Nullable *_Nullable)error;
Swift
init(midiSource source: MIKMIDISourceEndpoint, error: ()) throws
Parameters
source
An MIKMIDISourceEndpoint instance from which MIDI note events will be received.
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 initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Initializes an MIKMIDIEndpointSynthesizer instance.
Declaration
Objective-C
- (nullable instancetype) initWithMIDISource:(nonnull MIKMIDISourceEndpoint *)source componentDescription:(AudioComponentDescription)componentDescription error:(NSError *_Nullable *_Nullable)error;
Swift
init(midiSource source: MIKMIDISourceEndpoint, componentDescription: AudioComponentDescription, error: ()) throws
Parameters
source
An MIKMIDISourceEndpoint instance from which MIDI note events will be received.
componentDescription
an AudioComponentDescription describing the Audio Unit instrument you would like the synthesizer to use.
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 initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Creates and initializes an MIKMIDIEndpointSynthesizer instance using Apple’s DLS synth as the underlying instrument.
Declaration
Objective-C
+ (nullable instancetype) synthesizerWithClientDestinationEndpoint: (nonnull MIKMIDIClientDestinationEndpoint *)destination error: (NSError *_Nullable *_Nullable)error;
Parameters
destination
An MIKMIDIClientDestinationEndpoint instance from which MIDI note events will be received.
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 initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Creates and initializes an MIKMIDIEndpointSynthesizer instance.
Declaration
Objective-C
+ (nullable instancetype) synthesizerWithClientDestinationEndpoint: (nonnull MIKMIDIClientDestinationEndpoint *)destination componentDescription: (AudioComponentDescription)componentDescription error: (NSError *_Nullable *_Nullable)error;
Parameters
destination
An MIKMIDIClientDestinationEndpoint instance from which MIDI note events will be received.
componentDescription
an AudioComponentDescription describing the Audio Unit instrument you would like the synthesizer to use.
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 initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Initializes an MIKMIDIEndpointSynthesizer instance using Apple’s DLS synth as the underlying instrument.
Declaration
Objective-C
- (nullable instancetype) initWithClientDestinationEndpoint: (nonnull MIKMIDIClientDestinationEndpoint *)destination error:(NSError *_Nullable *_Nullable)error;
Swift
init(clientDestinationEndpoint destination: MIKMIDIClientDestinationEndpoint, error: ()) throws
Parameters
destination
An MIKMIDIClientDestinationEndpoint instance from which MIDI note events will be received.
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 initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Initializes an MIKMIDIEndpointSynthesizer instance.
Declaration
Objective-C
- (nullable instancetype) initWithClientDestinationEndpoint: (nonnull MIKMIDIClientDestinationEndpoint *)destination componentDescription: (AudioComponentDescription)componentDescription error:(NSError *_Nullable *_Nullable)error;
Swift
init(clientDestinationEndpoint destination: MIKMIDIClientDestinationEndpoint, componentDescription: AudioComponentDescription, error: ()) throws
Parameters
destination
An MIKMIDIClientDestinationEndpoint instance from which MIDI note events will be received.
componentDescription
an AudioComponentDescription describing the Audio Unit instrument you would like the synthesizer to use.
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 initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
The endpoint from which the receiver is receiving MIDI messages. This may be either an external MIKMIDISourceEndpoint, e.g. to synthesize MIDI events coming from an external MIDI keyboard, or it may be an MIKMIDIClientDestinationEndpoint, e.g. to synthesize MIDI events coming from an another application on the system.
Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) MIKMIDIEndpoint *endpoint;
Swift
var endpoint: MIKMIDIEndpoint? { get }
-
Deprecated
Use -playerWithMIDISource:error: instead.
Creates and initializes an MIKMIDIEndpointSynthesizer instance using Apple’s DLS synth as the underlying instrument.
@deprecated Use -playerWithMIDISource:error: instead.
Declaration
Objective-C
+ (nullable instancetype)playerWithMIDISource: (nonnull MIKMIDISourceEndpoint *)source;
Swift
class func player(withMIDISource source: MIKMIDISourceEndpoint) -> Self?
Parameters
source
An MIKMIDISourceEndpoint instance from which MIDI note events will be received.
Return Value
An initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Deprecated
Use -playerWithMIDISource:componentDescription:error: instead.
Creates and initializes an MIKMIDIEndpointSynthesizer instance.
@deprecated Use -playerWithMIDISource:componentDescription:error: instead.
Declaration
Objective-C
+ (nullable instancetype) playerWithMIDISource:(nonnull MIKMIDISourceEndpoint *)source componentDescription:(AudioComponentDescription)componentDescription;
Swift
class func player(withMIDISource source: MIKMIDISourceEndpoint, componentDescription: AudioComponentDescription) -> Self?
Parameters
source
An MIKMIDISourceEndpoint instance from which MIDI note events will be received.
componentDescription
an AudioComponentDescription describing the Audio Unit instrument you would like the synthesizer to use.
Return Value
An initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Deprecated
Use -initWithMIDISource:error: instead.
Initializes an MIKMIDIEndpointSynthesizer instance using Apple’s DLS synth as the underlying instrument.
@deprecated Use -initWithMIDISource:error: instead.
Declaration
Objective-C
- (nullable instancetype)initWithMIDISource: (nonnull MIKMIDISourceEndpoint *)source;
Swift
init?(midiSource source: MIKMIDISourceEndpoint)
Parameters
source
An MIKMIDISourceEndpoint instance from which MIDI note events will be received.
Return Value
An initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Deprecated
Use -initWithMIDISource:componentDescription:error: instead.
Initializes an MIKMIDIEndpointSynthesizer instance.
@deprecated Use -initWithMIDISource:componentDescription:error: instead.
Declaration
Objective-C
- (nullable instancetype) initWithMIDISource:(nonnull MIKMIDISourceEndpoint *)source componentDescription:(AudioComponentDescription)componentDescription;
Swift
init?(midiSource source: MIKMIDISourceEndpoint, componentDescription: AudioComponentDescription)
Parameters
source
An MIKMIDISourceEndpoint instance from which MIDI note events will be received.
componentDescription
an AudioComponentDescription describing the Audio Unit instrument you would like the synthesizer to use.
Return Value
An initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Deprecated
Use -synthesizerWithClientDestinationEndpoint:error: instead.
Creates and initializes an MIKMIDIEndpointSynthesizer instance using Apple’s DLS synth as the underlying instrument.
@deprecated Use -synthesizerWithClientDestinationEndpoint:error: instead.
Declaration
Objective-C
+ (nullable instancetype)synthesizerWithClientDestinationEndpoint: (nonnull MIKMIDIClientDestinationEndpoint *)destination;
Parameters
destination
An MIKMIDIClientDestinationEndpoint instance from which MIDI note events will be received.
Return Value
An initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Deprecated
Use -synthesizerWithClientDestinationEndpoint:componentDescription:error: instead.
Creates and initializes an MIKMIDIEndpointSynthesizer instance.
@deprecated Use -synthesizerWithClientDestinationEndpoint:componentDescription:error: instead.
Declaration
Objective-C
+ (nullable instancetype) synthesizerWithClientDestinationEndpoint: (nonnull MIKMIDIClientDestinationEndpoint *)destination componentDescription: (AudioComponentDescription)componentDescription;
Parameters
destination
An MIKMIDIClientDestinationEndpoint instance from which MIDI note events will be received.
componentDescription
an AudioComponentDescription describing the Audio Unit instrument you would like the synthesizer to use.
Return Value
An initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Deprecated
Use -initWithClientDestinationEndpoint:error: instead.
Initializes an MIKMIDIEndpointSynthesizer instance using Apple’s DLS synth as the underlying instrument.
@deprecated Use -initWithClientDestinationEndpoint:error: instead.
Declaration
Objective-C
- (nullable instancetype)initWithClientDestinationEndpoint: (nonnull MIKMIDIClientDestinationEndpoint *)destination;
Swift
init?(clientDestinationEndpoint destination: MIKMIDIClientDestinationEndpoint)
Parameters
destination
An MIKMIDIClientDestinationEndpoint instance from which MIDI note events will be received.
Return Value
An initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.
-
Deprecated
Use -initWithClientDestinationEndpoint:componentDescription:error: instead.
Initializes an MIKMIDIEndpointSynthesizer instance.
@deprecated Use -initWithClientDestinationEndpoint:componentDescription:error: instead.
Declaration
Objective-C
- (nullable instancetype) initWithClientDestinationEndpoint: (nonnull MIKMIDIClientDestinationEndpoint *)destination componentDescription: (AudioComponentDescription)componentDescription;
Swift
init?(clientDestinationEndpoint destination: MIKMIDIClientDestinationEndpoint, componentDescription: AudioComponentDescription)
Parameters
destination
An MIKMIDIClientDestinationEndpoint instance from which MIDI note events will be received.
componentDescription
an AudioComponentDescription describing the Audio Unit instrument you would like the synthesizer to use.
Return Value
An initialized MIKMIDIEndpointSynthesizer or nil if an error occurs.