MIKMIDIObject
Objective-C
@interface MIKMIDIObject : NSObject
Swift
class MIKMIDIObject : NSObject
MIKMIDIObject is the base class for all of MIKMIDI’s Objective-C wrapper classes for CoreMIDI classes. It corresponds to MIDIObject in CoreMIDI.
MIKMIDIObject is essentially an “abstract” base class, although it does implement several methods common to all MIDI objects.
-
Convenience method for creating a new MIKMIDIObject instance. Returns an instance of a concrete subclass of MIKMIDIObject (e.g. MIKMIDIDevice, MIKMIDIEntity, MIKMIDISource/DestinationEndpoint) depending on the type of the object passed into it.
Declaration
Objective-C
+ (nullable instancetype)MIDIObjectWithObjectRef:(MIDIObjectRef)objectRef;
Parameters
objectRef
A CoreMIDI MIDIObjectRef.
Return Value
An instance of the appropriate subclass of MIKMIDIObject.
-
Creates and initializes an MIKMIDIObject instance. Returns an instance of a concrete subclass of MIKMIDIObject (e.g. MIKMIDIDevice, MIKMIDIEntity, MIKMIDISource/DestinationEndpoint) depending on the type of the object passed into it.
Declaration
Objective-C
- (nullable instancetype)initWithObjectRef:(MIDIObjectRef)objectRef;
Swift
init?(objectRef: MIDIObjectRef)
Parameters
objectRef
A CoreMIDI MIDIObjectRef.
Return Value
An instance of the appropriate subclass of MIKMIDIObject.
-
Used to get a dictionary containing key/value pairs corresponding to the properties returned by CoreMIDI’s MIDIObjectGetProperties() function.
For a list of possible keys, see the “Property name constants” section of CoreMIDI/MIDIServices.h.
Declaration
Objective-C
- (nonnull NSDictionary *)propertiesDictionary;
Swift
func propertiesDictionary() -> [AnyHashable : Any]
Return Value
An NSDictionary containing various properties of the receiver. See
-
The CoreMIDI MIDIObjectRef which the receiver wraps.
Declaration
Objective-C
@property (nonatomic, readonly) MIDIObjectRef objectRef;
Swift
var objectRef: MIDIObjectRef { get }
-
The (CoreMIDI-supplied) unique ID for the receiver.
Declaration
Objective-C
@property (nonatomic, readonly) MIDIUniqueID uniqueID;
Swift
var uniqueID: MIDIUniqueID { get }
-
Whether the receiver is online (available for use) or not.
Declaration
Objective-C
@property (nonatomic, readonly, getter=isOnline) BOOL online;
Swift
var isOnline: Bool { get }
-
The name of the receiver. Devices, entities, and endpoints may all have names.
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSString *name;
Swift
var name: String? { get set }
-
The Apple-recommended user-visible name of the receiver. May be identical to the value returned by -name.
Declaration
Objective-C
@property (nonatomic, strong, readonly, nullable) NSString *displayName;
Swift
var displayName: String? { get }
-
Indicates whether the object is “virtual”. This has slightly different meanings depending on the type of MIDI object.
For MIKMIDIDevices, virtual means that the device does not represent a MIDIDeviceRef. Virtual devices can be used to wrap virtual, deviceless endpoints created e.g. by other software, some Native Instruments controllers, etc.
For MIKMIDIEntitys, virtual means that the entity is part of a virtual device and its endpoints are virtual endpoints.
For MIKMIDIEndpoints, virtual means that the endpoint is a virtual endpoint, rather than an endpoint of a (non-virtual) MIDI device.
@seealso -[MIKMIDIDeviceManager virtualSources] @seealso -[MIKMIDIDeviceManager virtualDestinations]
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isVirtual;
Swift
var isVirtual: Bool { get }