MIKMIDISynthesizerInstrument
Objective-C
@interface MIKMIDISynthesizerInstrument : NSObject
Swift
class MIKMIDISynthesizerInstrument : NSObject
MIKMIDISynthesizerInstrument is used to represent
-
Creates and initializes an MIKMIDISynthesizerInstrument with the corresponding instrument ID.
Declaration
Objective-C
+ (nullable instancetype)instrumentWithID:(MusicDeviceInstrumentID)instrumentID name:(nullable NSString *)name;
Swift
convenience init?(id instrumentID: MusicDeviceInstrumentID, name: String?)
Parameters
instrumentID
The MusicDeviceInstrumentID for the desired MIKMIDISynthesizerInstrument
name
The human readable name of the instrument.
Return Value
A MIKMIDISynthesizerInstrument instance with the matching instrument ID, or nil if no instrument was found.
-
The human readable name of the receiver. e.g. “Piano 1”.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull name;
Swift
var name: String { get }
-
The Core Audio supplied instrumentID for the receiver.
Declaration
Objective-C
@property (nonatomic, readonly) MusicDeviceInstrumentID instrumentID;
Swift
var instrumentID: MusicDeviceInstrumentID { get }
-
Deprecated
@deprecated Use -[MIKMIDISynthesizer availableInstruments] instead.
An array of available MIKMIDISynthesizerInstruments for use with MIKMIDIEndpointSynthesizer.
Declaration
Objective-C
+ (nonnull NSArray<MIKMIDISynthesizerInstrument *> *)availableInstruments;
Swift
class func availableInstruments() -> [MIKMIDISynthesizerInstrument]
Return Value
An NSArray containing MIKMIDISynthesizerInstrument instances.
-
Deprecated
@deprecated Use +instrumentWithID:inInstrumentUnit: instead.
Creates and initializes an MIKMIDISynthesizerInstrument with the corresponding instrument ID.
Declaration
Objective-C
+ (nullable instancetype)instrumentWithID:(MusicDeviceInstrumentID)instrumentID;
Swift
convenience init?(id instrumentID: MusicDeviceInstrumentID)
Parameters
instrumentID
The MusicDeviceInstrumentID for the desired MIKMIDISynthesizerInstrument
Return Value
A MIKMIDISynthesizerInstrument with the matching instrument ID, or nil if no instrument was found.