page1
Client Management
Endpoint Management
Device Lookup
Entity Lookup
Port Management
Event List Management
Packet List Management
I/O Management
MIDI Services
MIDI drivers own and control physical MIDI devices,
which include hardware such as USB interfaces, MIDI
keyboards, and so on.
A MIDI device may have multiple logically distinct
subcomponents. For example, one device may
contain a MIDI synthesizer and a pair of MIDI ports,
both addressable over a USB port.
Each element of a device is a MIDI entity.
A MIDI entity can have any number of MIDI endpoints,
each of which is a source or destination of a 16-
channel MIDI stream.
Grouping a device’s endpoints into entities provides
the system enough information for an app to make
reasonable default assumptions about how to
communicate bidirectionally with each entity, as is
necessary in MIDI librarian apps.
2020.12.18 This list is not complete. For more info please refer to the official docs: https://developer.apple.com/documentation/coremidi/midi_services
https://lensﬂare.dev/
typealias MIDIClientRef = MIDIObjectRef
typealias MIDIDeviceRef = MIDIObjectRef
typealias MIDIEntityRef = MIDIObjectRef
typealias MIDIPortRef = MIDIObjectRef
typealias MIDIEndpointRef = MIDIObjectRef
struct MIDIEventList
struct MIDIPacket
struct MIDISysexSendRequest
struct MIDIEventPacket
struct UnsafeMutableMIDIEventListPointer
struct
UnsafeMutableMIDIEventPacketPointer
A variable-length list of MIDI event packets.
A series of simultaneous MIDI events
in Universal MIDI Packets (UMP) format.
func MIDIEventListInit
Initializes an event list.
func MIDIEventListAdd
Adds an event to an event list.
func MIDIEventPacketNext
Advances a packet pointer to the next packet in memory,
if the packet is part of an event list.
func MIDIReceivedEventList
Distributes incoming MIDI events from a source to its
connected client input ports.
A collection of simultaneous MIDI events.
struct MIDIPacketList
A list of MIDI events the system sends to or receives
from an endpoint.
typealias MIDITimeStamp = UInt64
The time on the host clock when the event occurred.
struct
UnsafeMutableMIDIPacketListPointer
struct UnsafeMutableMIDIPacketPointer
func MIDIPacketNext
Advances a MIDI packet pointer to the next packet in a
packet list.
A request to asynchronously transmit a single System
Exclusive (SysEx) event to a destination.
struct MIDIIOErrorNotiﬁcation
A general I/O error notiﬁcation.
func MIDISendSysex
Asynchronously sends a single System Exclusive
(SysEx) event.
func MIDIFlushOutput
Cancels sending packets that were previously
scheduled for future delivery.
func MIDIRestart
Stops and restarts MIDI I/O.
A MIDI source or destination an entity owns.
UInt32 on tvOS
func MIDIEndpointDispose
Disposes of a virtual source or destination.
func MIDIEndpointGetEntity
Returns an endpoint’s entity.
func MIDIEndpointGetRefCons
Returns contextual data assigned to an endpoint.
func MIDIEndpointSetRefCons
Sets contextual data on an endpoint.
func MIDISourceCreateWithProtocol
Creates a virtual source in a client.
func MIDIGetSource
Returns a source in the system.
func MIDIGetNumberOfSources
Returns the number of sources in the system.
func MIDIDestinationCreateWithProtocol
Creates a virtual destination in a client.
func MIDIGetDestination
Returns a destination in the system.
func MIDIGetNumberOfDestinations
Returns the number of destinations in the system.
A MIDI connection that a client maintains.
func MIDIInputPortCreateWithProtocol
Creates an input port through which the client may
receive incoming MIDI messages from any MIDI source.
func MIDIOutputPortCreate
Creates an output port through which a client sends
outgoing MIDI messages to any MIDI destination.
func MIDIPortDispose
Disposes of a MIDI port.
func MIDIPortConnectSource
Makes a connection from a source to a client input port.
func MIDIPortDisconnectSource
Closes a previously established source-to-input port
connection.
An entity that a device owns and that contains endpoints.
func MIDIEntityGetDevice
Returns an entity’s device.
func MIDIEntityGetNumberOfSources
Returns the number of sources in an entity.
func MIDIEntityGetSource
Returns one of an entity’s sources.
func MIDIEntityGetNumberOfDestinations
Returns the number of destinations in an entity.
func MIDIEntityGetDestination
Returns one of an entity’s destinations.
A MIDI device that contains entities.
func MIDIGetNumberOfDevices
Returns the number of devices in the system.
func MIDIGetDevice
Returns a device from the system.
func MIDIGetNumberOfExternalDevices
Returns the number of external MIDI devices
in the system.
func MIDIGetExternalDevice
Returns one of the external devices in the system.
func MIDIDeviceGetNumberOfEntities
Returns the number of entities in a device.
func MIDIDeviceGetEntity
Returns the device’s entity at a speciﬁc index.
An object that maintains per-client state.
func MIDIClientCreate
Creates a MIDI client.
func MIDIClientCreateWithBlock
Creates a MIDI client with a callback block.
func MIDIClientDispose
Disposes of a MIDI client.
MIDI Object Conﬁguration
typealias MIDIObjectRef = UInt32
The common base class for many
of the framework’s objects.
func MIDIObjectFindByUniqueID
Locates a device, entity, or endpoint
by its unique identiﬁer.
MIDI Object Properties
List of the properties of MIDI objects
MIDI Services Errors
Error codes for Core MIDI operations.
Deprecated Symbols
Unsupported symbols and their replacements.
MIDI Driver
Device 1 (Synthesizer)
Device 2 (MIDI Hub)
Entity 1
Endpoint 1
Endpoint 2
Endpoint 3
…
Entity 2
Endpoint 1
Endpoint 2
Endpoint 3
…
…
Entity 1
Endpoint 1
Endpoint 2
Endpoint 3
…
Entity 2
Endpoint 1
Endpoint 2
Endpoint 3
…
…
…
func MIDISendEventList
Sends MIDI events to a destination.