coremidi

package
v0.6.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package coremidi provides Go bindings for the CoreMIDI framework.

Communicate with MIDI devices such as hardware keyboards and synthesizers.

The Core MIDI framework provides APIs to communicate with MIDI (Musical Instrument Digital Interface) devices, including hardware keyboards and synthesizers. Connect from an iOS device using the dock connector or a network. For more information about using the dock connector, see the [MFi Program].

Services

Classes

Variables

Key Types

Code generated from Apple documentation. DO NOT EDIT.

Index

Constants

uint8 values.

View Source
const KMIDIInvalidUniqueID int32 = 0

Variables

View Source
var (
	// MIDINetworkBonjourServiceType is the Bonjour service type.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkBonjourServiceType
	MIDINetworkBonjourServiceType string
	// MIDINetworkNotificationContactsDidChange is indicates that the list of contacts changed.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkNotificationContactsDidChange
	MIDINetworkNotificationContactsDidChange string
	// MIDINetworkNotificationSessionDidChange is indicates that other aspects of the session changed, such as the connection list, connection policy, and so on.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkNotificationSessionDidChange
	MIDINetworkNotificationSessionDidChange string
)
View Source
var (
	// KMIDIDriverPropertyUsesSerial is a value that indicates whether the driver uses serial ports and is eligible to have serial ports assigned to it.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIDriverPropertyUsesSerial
	KMIDIDriverPropertyUsesSerial string
	// KMIDIPropertyAdvanceScheduleTimeMuSec is the recommended number of microseconds in advance that clients should schedule output.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyAdvanceScheduleTimeMuSec
	KMIDIPropertyAdvanceScheduleTimeMuSec string
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyAssociatedEndpoint
	KMIDIPropertyAssociatedEndpoint string
	// KMIDIPropertyCanRoute is a Boolean value that indicates whether the device or entity can route messages to or from external MIDI devices.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyCanRoute
	KMIDIPropertyCanRoute string
	// KMIDIPropertyConnectionUniqueID is the unique identifier of an external device attached to this connection.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyConnectionUniqueID
	KMIDIPropertyConnectionUniqueID string
	// KMIDIPropertyDeviceID is the user-visible System Exclusive (SysEx) identifier of a device or entity.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyDeviceID
	KMIDIPropertyDeviceID string
	// KMIDIPropertyDisplayName is the user-visible name for an endpoint that combines the device and endpoint names.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyDisplayName
	KMIDIPropertyDisplayName string
	// KMIDIPropertyDriverDeviceEditorApp is the full path to an app on the system that configures driver-owned devices.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyDriverDeviceEditorApp
	KMIDIPropertyDriverDeviceEditorApp string
	// KMIDIPropertyDriverOwner is the name of the driver that owns a device, entity, or endpoint.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyDriverOwner
	KMIDIPropertyDriverOwner string
	// KMIDIPropertyDriverVersion is the version of the driver that owns a device, entity, or endpoint.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyDriverVersion
	KMIDIPropertyDriverVersion string
	// KMIDIPropertyImage is the full path to a device icon on the system.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyImage
	KMIDIPropertyImage string
	// KMIDIPropertyIsBroadcast is a Boolean value that indicates whether the endpoint broadcasts messages to all of the other endpoints in the device.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyIsBroadcast
	KMIDIPropertyIsBroadcast string
	// KMIDIPropertyIsDrumMachine is a Boolean value that indicates whether the device or entity’s samples aren’t transposable, as with a drum kit.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyIsDrumMachine
	KMIDIPropertyIsDrumMachine string
	// KMIDIPropertyIsEffectUnit is a Boolean value that indicates whether the device or entity primarily acts as a MIDI-controlled audio effect.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyIsEffectUnit
	KMIDIPropertyIsEffectUnit string
	// KMIDIPropertyIsEmbeddedEntity is a Boolean value that indicates whether this entity or endpoint has external MIDI connections.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyIsEmbeddedEntity
	KMIDIPropertyIsEmbeddedEntity string
	// KMIDIPropertyIsMixer is a Boolean value that indicates whether the device or entity mixes external audio signals.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyIsMixer
	KMIDIPropertyIsMixer string
	// KMIDIPropertyIsSampler is a Boolean value that indicates whether the device or entity plays audio samples in response to MIDI note messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyIsSampler
	KMIDIPropertyIsSampler string
	// KMIDIPropertyManufacturer is the manufacturer name of a device or endpoint.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyManufacturer
	KMIDIPropertyManufacturer string
	// KMIDIPropertyMaxReceiveChannels is the maximum number of MIDI channels on which a device may simultaneously receive channel messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyMaxReceiveChannels
	KMIDIPropertyMaxReceiveChannels string
	// KMIDIPropertyMaxSysExSpeed is the maximum rate, in bytes per second, at which the system may reliably send System Exclusive (SysEx) messages to this object.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyMaxSysExSpeed
	KMIDIPropertyMaxSysExSpeed string
	// KMIDIPropertyMaxTransmitChannels is the maximum number of MIDI channels on which a device may simultaneously transmit channel messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyMaxTransmitChannels
	KMIDIPropertyMaxTransmitChannels string
	// KMIDIPropertyModel is the model name of a device or endpoint.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyModel
	KMIDIPropertyModel string
	// KMIDIPropertyName is a name for a device, entity, or endpoint.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyName
	KMIDIPropertyName string
	// KMIDIPropertyNameConfigurationDictionary is the device’s current patch, note, and control name values in MIDINameDocument XML format.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyNameConfigurationDictionary
	KMIDIPropertyNameConfigurationDictionary string
	// KMIDIPropertyOffline is a Boolean value that indicates whether the object is offline.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyOffline
	KMIDIPropertyOffline string
	// KMIDIPropertyPanDisruptsStereo is a Boolean value that indicates whether the MIDI pan messages sent to the device or entity cause undesirable effects when playing stereo sounds.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyPanDisruptsStereo
	KMIDIPropertyPanDisruptsStereo string
	// KMIDIPropertyPrivate is a Boolean value that indicates whether the system hides an endpoint from other clients.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyPrivate
	KMIDIPropertyPrivate string
	// KMIDIPropertyProtocolID is the native protocol in which the endpoint communicates.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyProtocolID
	KMIDIPropertyProtocolID string
	// KMIDIPropertyReceiveChannels is the bitmap of channels on which the object receives messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyReceiveChannels
	KMIDIPropertyReceiveChannels string
	// KMIDIPropertyReceivesBankSelectLSB is a Boolean value that indicates whether the device or entity responds to MIDI bank select LSB messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyReceivesBankSelectLSB
	KMIDIPropertyReceivesBankSelectLSB string
	// KMIDIPropertyReceivesBankSelectMSB is a Boolean value that indicates whether the device or entity responds to MIDI bank select MSB messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyReceivesBankSelectMSB
	KMIDIPropertyReceivesBankSelectMSB string
	// KMIDIPropertyReceivesClock is a Boolean value that indicates whether the device or entity responds to MIDI beat clock messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyReceivesClock
	KMIDIPropertyReceivesClock string
	// KMIDIPropertyReceivesMTC is a Boolean value that indicates whether the device or entity responds to MIDI Time Code messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyReceivesMTC
	KMIDIPropertyReceivesMTC string
	// KMIDIPropertyReceivesNotes is a Boolean value that indicates whether the device or entity responds to MIDI Note On messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyReceivesNotes
	KMIDIPropertyReceivesNotes string
	// KMIDIPropertyReceivesProgramChanges is a Boolean value that indicates whether the device or entity responds to MIDI Program Change messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyReceivesProgramChanges
	KMIDIPropertyReceivesProgramChanges string
	// KMIDIPropertySingleRealtimeEntity is the 0-based index of the entity on which incoming real-time messages from the device appear to have originated.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertySingleRealtimeEntity
	KMIDIPropertySingleRealtimeEntity string
	// KMIDIPropertySupportsGeneralMIDI is a Boolean value that indicates whether the device or entity implements the General MIDI specification.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertySupportsGeneralMIDI
	KMIDIPropertySupportsGeneralMIDI string
	// KMIDIPropertySupportsMMC is a Boolean value that indicates whether the device or entity implements the MIDI Machine Control portion of the MIDI specification.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertySupportsMMC
	KMIDIPropertySupportsMMC string
	// KMIDIPropertySupportsShowControl is a Boolean value that indicates whether the device implements the MIDI Show Control specification.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertySupportsShowControl
	KMIDIPropertySupportsShowControl string
	// KMIDIPropertyTransmitChannels is the bitmap of channels on which the object transmits messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyTransmitChannels
	KMIDIPropertyTransmitChannels string
	// KMIDIPropertyTransmitsBankSelectLSB is a Boolean value that indicates whether the device or entity transmits MIDI bank select LSB messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyTransmitsBankSelectLSB
	KMIDIPropertyTransmitsBankSelectLSB string
	// KMIDIPropertyTransmitsBankSelectMSB is a Boolean value that indicates whether the device or entity transmits MIDI bank select MSB messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyTransmitsBankSelectMSB
	KMIDIPropertyTransmitsBankSelectMSB string
	// KMIDIPropertyTransmitsClock is a Boolean value that indicates whether the device or entity transmits MIDI beat clock messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyTransmitsClock
	KMIDIPropertyTransmitsClock string
	// KMIDIPropertyTransmitsMTC is a Boolean value that indicates whether the device or entity transmits MIDI Time Code messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyTransmitsMTC
	KMIDIPropertyTransmitsMTC string
	// KMIDIPropertyTransmitsNotes is a Boolean value that indicates whether the device or entity transmits MIDI note messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyTransmitsNotes
	KMIDIPropertyTransmitsNotes string
	// KMIDIPropertyTransmitsProgramChanges is a Boolean value that indicates whether the device or entity transmits MIDI Program Change messages.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyTransmitsProgramChanges
	KMIDIPropertyTransmitsProgramChanges string
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyUMPActiveGroupBitmap
	KMIDIPropertyUMPActiveGroupBitmap string
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyUMPCanTransmitGroupless
	KMIDIPropertyUMPCanTransmitGroupless string
	// KMIDIPropertyUMPEnabled is kMIDIPropertyUMPEnabled.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyUMPEnabled
	KMIDIPropertyUMPEnabled string
	// KMIDIPropertyUniqueID is the unique identifier of a device, entity, or, endpoint.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/kMIDIPropertyUniqueID
	KMIDIPropertyUniqueID string
)

Functions

func MIDIBluetoothDriverActivateAllConnections

func MIDIBluetoothDriverActivateAllConnections() int32

MIDIBluetoothDriverActivateAllConnections promote all active Bluetooth connections into an online MIDI device capable of input and output.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIBluetoothDriverActivateAllConnections()

func MIDIBluetoothDriverDisconnect

func MIDIBluetoothDriverDisconnect(uuid corefoundation.CFStringRef) int32

MIDIBluetoothDriverDisconnect disconnect the Bluetooth MIDI driver from a Bluetooth Low Energy MIDI peripheral.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIBluetoothDriverDisconnect(_:)

func MIDIClientCreate

func MIDIClientCreate(name corefoundation.CFStringRef, notifyProc MIDINotifyProc, notifyRefCon unsafe.Pointer, outClient *MIDIClientRef) int32

MIDIClientCreate creates a MIDI client.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIClientCreate(_:_:_:_:)

func MIDIClientCreateWithBlock

func MIDIClientCreateWithBlock(name corefoundation.CFStringRef, outClient *MIDIClientRef, notifyBlock MIDINotifyBlock) int32

MIDIClientCreateWithBlock creates a MIDI client with a callback block.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIClientCreateWithBlock(_:_:_:)

func MIDIClientDispose

func MIDIClientDispose(client MIDIClientRef) int32

MIDIClientDispose disposes of a MIDI client.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIClientDispose(_:)

func MIDIDestinationCreateWithProtocol

func MIDIDestinationCreateWithProtocol(client MIDIClientRef, name corefoundation.CFStringRef, protocol_ MIDIProtocolID, outDest *MIDIEndpointRef, readBlock MIDIReceiveBlock) int32

MIDIDestinationCreateWithProtocol creates a virtual destination in a client.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDestinationCreateWithProtocol(_:_:_:_:_:)

func MIDIDeviceAddEntity deprecated

func MIDIDeviceAddEntity(device MIDIDeviceRef, name corefoundation.CFStringRef, embedded bool, numSourceEndpoints uint, numDestinationEndpoints uint, newEntity *MIDIEntityRef) int32

MIDIDeviceAddEntity specifies one of the entities that make up a device.

Deprecated: Deprecated since macOS 11.0.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceAddEntity(_:_:_:_:_:_:)

func MIDIDeviceCreate

func MIDIDeviceCreate(owner MIDIDriverRef, name corefoundation.CFStringRef, manufacturer corefoundation.CFStringRef, model corefoundation.CFStringRef, outDevice *MIDIDeviceRef) int32

MIDIDeviceCreate creates a new device object that corresponds to the available hardware.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceCreate(_:_:_:_:_:)

func MIDIDeviceDispose

func MIDIDeviceDispose(device MIDIDeviceRef) int32

MIDIDeviceDispose disposes of a MIDI device.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceDispose(_:)

func MIDIDeviceGetNumberOfEntities

func MIDIDeviceGetNumberOfEntities(device MIDIDeviceRef) uint

MIDIDeviceGetNumberOfEntities returns the number of entities in a device.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceGetNumberOfEntities(_:)

func MIDIDeviceListAddDevice

func MIDIDeviceListAddDevice(devList MIDIDeviceListRef, dev MIDIDeviceRef) int32

MIDIDeviceListAddDevice adds the specified device to the device list.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceListAddDevice(_:_:)

func MIDIDeviceListDispose

func MIDIDeviceListDispose(devList MIDIDeviceListRef) int32

MIDIDeviceListDispose disposes of a device list, but not its devices.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceListDispose(_:)

func MIDIDeviceListGetNumberOfDevices

func MIDIDeviceListGetNumberOfDevices(devList MIDIDeviceListRef) uint

MIDIDeviceListGetNumberOfDevices retrieves the number of devices in a device list.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceListGetNumberOfDevices(_:)

func MIDIDeviceNewEntity

func MIDIDeviceNewEntity(device MIDIDeviceRef, name corefoundation.CFStringRef, protocol_ MIDIProtocolID, embedded bool, numSourceEndpoints uint, numDestinationEndpoints uint, newEntity *MIDIEntityRef) int32

MIDIDeviceNewEntity adds a new entity to a device.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceNewEntity(_:_:_:_:_:_:_:)

func MIDIDeviceRemoveEntity

func MIDIDeviceRemoveEntity(device MIDIDeviceRef, entity MIDIEntityRef) int32

MIDIDeviceRemoveEntity removes an entity from a device.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceRemoveEntity(_:_:)

func MIDIDriverEnableMonitoring

func MIDIDriverEnableMonitoring(driver MIDIDriverRef, enabled bool) int32

MIDIDriverEnableMonitoring enables monitoring of all outgoing MIDI packets.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDriverEnableMonitoring(_:_:)

func MIDIEndpointDispose

func MIDIEndpointDispose(endpt MIDIEndpointRef) int32

MIDIEndpointDispose disposes of a virtual source or destination.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEndpointDispose(_:)

func MIDIEndpointGetEntity

func MIDIEndpointGetEntity(inEndpoint MIDIEndpointRef, outEntity *MIDIEntityRef) int32

MIDIEndpointGetEntity returns an endpoint’s entity.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEndpointGetEntity(_:_:)

func MIDIEndpointGetRefCons

func MIDIEndpointGetRefCons(endpt MIDIEndpointRef, ref1 unsafe.Pointer, ref2 unsafe.Pointer) int32

MIDIEndpointGetRefCons returns contextual data assigned to an endpoint.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEndpointGetRefCons(_:_:_:)

func MIDIEndpointSetRefCons

func MIDIEndpointSetRefCons(endpt MIDIEndpointRef, ref1 unsafe.Pointer, ref2 unsafe.Pointer) int32

MIDIEndpointSetRefCons sets contextual data on an endpoint.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEndpointSetRefCons(_:_:_:)

func MIDIEntityAddOrRemoveEndpoints

func MIDIEntityAddOrRemoveEndpoints(entity MIDIEntityRef, numSourceEndpoints uint, numDestinationEndpoints uint) int32

MIDIEntityAddOrRemoveEndpoints adds or removes an entity’s endpoints.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEntityAddOrRemoveEndpoints(_:_:_:)

func MIDIEntityGetDevice

func MIDIEntityGetDevice(inEntity MIDIEntityRef, outDevice *MIDIDeviceRef) int32

MIDIEntityGetDevice returns an entity’s device.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEntityGetDevice(_:_:)

func MIDIEntityGetNumberOfDestinations

func MIDIEntityGetNumberOfDestinations(entity MIDIEntityRef) uint

MIDIEntityGetNumberOfDestinations returns the number of destinations in an entity.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEntityGetNumberOfDestinations(_:)

func MIDIEntityGetNumberOfSources

func MIDIEntityGetNumberOfSources(entity MIDIEntityRef) uint

MIDIEntityGetNumberOfSources returns the number of sources in an entity.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEntityGetNumberOfSources(_:)

func MIDIEventListForEachEvent

func MIDIEventListForEachEvent(evtlist *MIDIEventList, visitor MIDIEventVisitor, visitorContext unsafe.Pointer)

MIDIEventListForEachEvent.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEventListForEachEvent(_:_:_:)

func MIDIEventPacketSysexBytesForGroup

func MIDIEventPacketSysexBytesForGroup(pkt *MIDIEventPacket, groupIndex uint8, outData *corefoundation.CFDataRef) int32

MIDIEventPacketSysexBytesForGroup gets MIDI 1.0 system-exclusive (SysEx) bytes on the indicated group.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEventPacketSysexBytesForGroup(_:_:_:)

func MIDIExternalDeviceCreate

func MIDIExternalDeviceCreate(name corefoundation.CFStringRef, manufacturer corefoundation.CFStringRef, model corefoundation.CFStringRef, outDevice *MIDIDeviceRef) int32

MIDIExternalDeviceCreate creates an external MIDI device.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIExternalDeviceCreate(_:_:_:_:)

func MIDIFlushOutput

func MIDIFlushOutput(dest MIDIEndpointRef) int32

MIDIFlushOutput cancels all pending events that were previously scheduled to send.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIFlushOutput(_:)

func MIDIGetDriverIORunLoop

func MIDIGetDriverIORunLoop() corefoundation.CFRunLoopRef

MIDIGetDriverIORunLoop returns the server’s driver I/O thread.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetDriverIORunLoop()

func MIDIGetNumberOfDestinations

func MIDIGetNumberOfDestinations() uint

MIDIGetNumberOfDestinations returns the number of destinations in the system.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetNumberOfDestinations()

func MIDIGetNumberOfDevices

func MIDIGetNumberOfDevices() uint

MIDIGetNumberOfDevices returns the number of devices in the system.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetNumberOfDevices()

func MIDIGetNumberOfExternalDevices

func MIDIGetNumberOfExternalDevices() uint

MIDIGetNumberOfExternalDevices returns the number of external MIDI devices in the system.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetNumberOfExternalDevices()

func MIDIGetNumberOfSources

func MIDIGetNumberOfSources() uint

MIDIGetNumberOfSources returns the number of sources in the system.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetNumberOfSources()

func MIDIGetSerialPortDrivers deprecated

func MIDIGetSerialPortDrivers(outDriverNames *corefoundation.CFArrayRef) int32

MIDIGetSerialPortDrivers returns a list of installed MIDI drivers for serial port MIDI devices.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetSerialPortDrivers

func MIDIGetSerialPortOwner deprecated

func MIDIGetSerialPortOwner(portName corefoundation.CFStringRef, outDriverName *corefoundation.CFStringRef) int32

MIDIGetSerialPortOwner returns the MIDI driver that owns a serial port.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetSerialPortOwner

func MIDIInputPortCreateWithProtocol

func MIDIInputPortCreateWithProtocol(client MIDIClientRef, portName corefoundation.CFStringRef, protocol_ MIDIProtocolID, outPort *MIDIPortRef, receiveBlock MIDIReceiveBlock) int32

MIDIInputPortCreateWithProtocol creates an input port through which the client may receive incoming MIDI messages from any MIDI source.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIInputPortCreateWithProtocol(_:_:_:_:_:)

func MIDIObjectFindByUniqueID

func MIDIObjectFindByUniqueID(inUniqueID MIDIUniqueID, outObject *MIDIObjectRef, outObjectType *MIDIObjectType) int32

MIDIObjectFindByUniqueID locates a device, entity, or endpoint by its unique identifier.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectFindByUniqueID(_:_:_:)

func MIDIObjectGetDataProperty

func MIDIObjectGetDataProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef, outData *corefoundation.CFDataRef) int32

MIDIObjectGetDataProperty gets an object’s data-type property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectGetDataProperty(_:_:_:)

func MIDIObjectGetDictionaryProperty

func MIDIObjectGetDictionaryProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef, outDict *corefoundation.CFDictionaryRef) int32

MIDIObjectGetDictionaryProperty gets an object’s dictionary-type property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectGetDictionaryProperty(_:_:_:)

func MIDIObjectGetIntegerProperty

func MIDIObjectGetIntegerProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef, outValue *int32) int32

MIDIObjectGetIntegerProperty gets an object’s integer-type property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectGetIntegerProperty(_:_:_:)

func MIDIObjectGetProperties

func MIDIObjectGetProperties(obj MIDIObjectRef, outProperties *corefoundation.CFPropertyListRef, deep bool) int32

MIDIObjectGetProperties returns all properties of an object.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectGetProperties(_:_:_:)

func MIDIObjectGetStringProperty

func MIDIObjectGetStringProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef, str *corefoundation.CFStringRef) int32

MIDIObjectGetStringProperty gets an object’s string-type property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectGetStringProperty(_:_:_:)

func MIDIObjectRemoveProperty

func MIDIObjectRemoveProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef) int32

MIDIObjectRemoveProperty removes an object’s property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectRemoveProperty(_:_:)

func MIDIObjectSetDataProperty

func MIDIObjectSetDataProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef, data corefoundation.CFDataRef) int32

MIDIObjectSetDataProperty sets an object’s data-type property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectSetDataProperty(_:_:_:)

func MIDIObjectSetDictionaryProperty

func MIDIObjectSetDictionaryProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef, dict corefoundation.CFDictionaryRef) int32

MIDIObjectSetDictionaryProperty sets an object’s dictionary-type property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectSetDictionaryProperty(_:_:_:)

func MIDIObjectSetIntegerProperty

func MIDIObjectSetIntegerProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef, value int32) int32

MIDIObjectSetIntegerProperty sets an object’s integer-type property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectSetIntegerProperty(_:_:_:)

func MIDIObjectSetStringProperty

func MIDIObjectSetStringProperty(obj MIDIObjectRef, propertyID corefoundation.CFStringRef, str corefoundation.CFStringRef) int32

MIDIObjectSetStringProperty sets an object’s string-type property.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectSetStringProperty(_:_:_:)

func MIDIOutputPortCreate

func MIDIOutputPortCreate(client MIDIClientRef, portName corefoundation.CFStringRef, outPort *MIDIPortRef) int32

MIDIOutputPortCreate creates an output port through which a client sends outgoing MIDI messages to any MIDI destination.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIOutputPortCreate(_:_:_:)

func MIDIPortConnectSource

func MIDIPortConnectSource(port MIDIPortRef, source MIDIEndpointRef, connRefCon unsafe.Pointer) int32

MIDIPortConnectSource makes a connection from a source to a client input port.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIPortConnectSource(_:_:_:)

func MIDIPortDisconnectSource

func MIDIPortDisconnectSource(port MIDIPortRef, source MIDIEndpointRef) int32

MIDIPortDisconnectSource closes a previously established source-to-input port connection.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIPortDisconnectSource(_:_:)

func MIDIPortDispose

func MIDIPortDispose(port MIDIPortRef) int32

MIDIPortDispose disposes of a MIDI port.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIPortDispose(_:)

func MIDIReceivedEventList

func MIDIReceivedEventList(src MIDIEndpointRef, evtlist *MIDIEventList) int32

MIDIReceivedEventList distributes incoming MIDI events from a source to its connected client input ports.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIReceivedEventList(_:_:)

func MIDIRestart

func MIDIRestart() int32

MIDIRestart stops and restarts MIDI I/O.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIRestart()

func MIDISendEventList

func MIDISendEventList(port MIDIPortRef, dest MIDIEndpointRef, evtlist *MIDIEventList) int32

MIDISendEventList sends MIDI events to a destination.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISendEventList(_:_:_:)

func MIDISendSysex

func MIDISendSysex(request *MIDISysexSendRequest) int32

MIDISendSysex asynchronously sends a single system-exclusive (SysEx) event.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISendSysex(_:)

func MIDISendUMPSysex

func MIDISendUMPSysex(umpRequest *MIDISysexSendRequestUMP) int32

MIDISendUMPSysex asynchronously sends a single universal MIDI packet (UMP) system-exclusive (SysEx) event.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISendUMPSysex(_:)

func MIDISendUMPSysex8

func MIDISendUMPSysex8(umpRequest *MIDISysexSendRequestUMP) int32

MIDISendUMPSysex8 asynchronously sends a single universal MIDI packet (UMP) system-exclusive (SysEx) event with an 8-bit message.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISendUMPSysex8(_:)

func MIDISetSerialPortOwner deprecated

func MIDISetSerialPortOwner(portName corefoundation.CFStringRef, driverName corefoundation.CFStringRef) int32

MIDISetSerialPortOwner specifies the MIDI driver that owns a serial port.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetSerialPortOwner

func MIDISetupAddDevice

func MIDISetupAddDevice(device MIDIDeviceRef) int32

MIDISetupAddDevice adds a driver-owned MIDI device to the current MIDI setup.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupAddDevice(_:)

func MIDISetupAddExternalDevice

func MIDISetupAddExternalDevice(device MIDIDeviceRef) int32

MIDISetupAddExternalDevice adds an external MIDI device to the current MIDI setup.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupAddExternalDevice(_:)

func MIDISetupCreate deprecated

func MIDISetupCreate(outSetup *MIDISetupRef) int32

MIDISetupCreate queries drivers to discover what hardware is available.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupCreate

func MIDISetupDispose deprecated

func MIDISetupDispose(setup MIDISetupRef) int32

MIDISetupDispose disposes the specified setup object.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupDispose

func MIDISetupFromData deprecated

func MIDISetupFromData(data corefoundation.CFDataRef, outSetup *MIDISetupRef) int32

MIDISetupFromData creates a MIDISetup object from an XML stream.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupFromData

func MIDISetupGetCurrent deprecated

func MIDISetupGetCurrent(outSetup *MIDISetupRef) int32

MIDISetupGetCurrent returns the system’s current MIDISetup.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupGetCurrent

func MIDISetupInstall deprecated

func MIDISetupInstall(setup MIDISetupRef) int32

MIDISetupInstall installs a MIDISetup as the system’s current state.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupInstall

func MIDISetupRemoveDevice

func MIDISetupRemoveDevice(device MIDIDeviceRef) int32

MIDISetupRemoveDevice removes a driver-owned MIDI device from the current MIDI setup.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupRemoveDevice(_:)

func MIDISetupRemoveExternalDevice

func MIDISetupRemoveExternalDevice(device MIDIDeviceRef) int32

MIDISetupRemoveExternalDevice removes an external MIDI device from the current MIDI setup.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupRemoveExternalDevice(_:)

func MIDISetupToData deprecated

func MIDISetupToData(setup MIDISetupRef, outData *corefoundation.CFDataRef) int32

MIDISetupToData creates an XML representation of a MIDISetup object.

Deprecated: Deprecated since macOS 10.6.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupToData

func MIDISourceCreateWithProtocol

func MIDISourceCreateWithProtocol(client MIDIClientRef, name corefoundation.CFStringRef, protocol_ MIDIProtocolID, outSrc *MIDIEndpointRef) int32

MIDISourceCreateWithProtocol creates a virtual source in a client.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISourceCreateWithProtocol(_:_:_:_:)

func MIDIThruConnectionCreate

func MIDIThruConnectionCreate(inPersistentOwnerID corefoundation.CFStringRef, inConnectionParams corefoundation.CFDataRef, outConnection *MIDIThruConnectionRef) int32

MIDIThruConnectionCreate creates a MIDI thru connection.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionCreate(_:_:_:)

func MIDIThruConnectionDispose

func MIDIThruConnectionDispose(connection MIDIThruConnectionRef) int32

MIDIThruConnectionDispose disposes a MIDI thru connection.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionDispose(_:)

func MIDIThruConnectionFind

func MIDIThruConnectionFind(inPersistentOwnerID corefoundation.CFStringRef, outConnectionList *corefoundation.CFDataRef) int32

MIDIThruConnectionFind finds the persistent thru connections for the specified client.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionFind(_:_:)

func MIDIThruConnectionGetParams

func MIDIThruConnectionGetParams(connection MIDIThruConnectionRef, outConnectionParams *corefoundation.CFDataRef) int32

MIDIThruConnectionGetParams returns the thru connection’s parameters.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionGetParams(_:_:)

func MIDIThruConnectionParamsInitialize

func MIDIThruConnectionParamsInitialize(inConnectionParams *MIDIThruConnectionParams)

MIDIThruConnectionParamsInitialize initializes a parameters object with its default values.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionParamsInitialize(_:)

func MIDIThruConnectionSetParams

func MIDIThruConnectionSetParams(connection MIDIThruConnectionRef, inConnectionParams corefoundation.CFDataRef) int32

MIDIThruConnectionSetParams updates a thru connection’s parameters.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionSetParams(_:_:)

func NewMIDICIDiscoveredNodeArrayBlock

func NewMIDICIDiscoveredNodeArrayBlock(handler MIDICIDiscoveredNodeArrayHandler) (objc.ID, func())

NewMIDICIDiscoveredNodeArrayBlock wraps a Go MIDICIDiscoveredNodeArrayHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [MIDICIDiscoveryManager.DiscoverWithHandler]

func NewMIDICIProfileChangedBlock

func NewMIDICIProfileChangedBlock(handler MIDICIProfileChangedBlock) (objc.ID, func())

NewMIDICIProfileChangedBlock wraps a Go MIDICIProfileChangedBlock as an Objective-C block. The caller must defer the returned cleanup function.

func NewMIDICIProfileSpecificDataBlock

func NewMIDICIProfileSpecificDataBlock(handler MIDICIProfileSpecificDataBlock) (objc.ID, func())

NewMIDICIProfileSpecificDataBlock wraps a Go MIDICIProfileSpecificDataBlock as an Objective-C block. The caller must defer the returned cleanup function.

func NewMIDICISessionDisconnectBlock

func NewMIDICISessionDisconnectBlock(handler MIDICISessionDisconnectBlock) (objc.ID, func())

NewMIDICISessionDisconnectBlock wraps a Go MIDICISessionDisconnectBlock as an Objective-C block. The caller must defer the returned cleanup function.

func NewMIDICISessionErrorBlock

func NewMIDICISessionErrorBlock(handler MIDICISessionErrorHandler) (objc.ID, func())

NewMIDICISessionErrorBlock wraps a Go MIDICISessionErrorHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [MIDICISession.InitWithDiscoveredNodeDataReadyHandlerDisconnectHandler]

func NewMIDICISessionUint32MIDICIProfileDataBlock

func NewMIDICISessionUint32MIDICIProfileDataBlock(handler MIDICISessionUint32MIDICIProfileDataHandler) (objc.ID, func())

NewMIDICISessionUint32MIDICIProfileDataBlock wraps a Go MIDICISessionUint32MIDICIProfileDataHandler as an Objective-C block. The caller must defer the returned cleanup function.

func NewMIDICISessionUint32MIDICIProfileInt32Block

func NewMIDICISessionUint32MIDICIProfileInt32Block(handler MIDICISessionUint32MIDICIProfileInt32Handler) (objc.ID, func())

NewMIDICISessionUint32MIDICIProfileInt32Block wraps a Go MIDICISessionUint32MIDICIProfileInt32Handler as an Objective-C block. The caller must defer the returned cleanup function.

func NewMIDIEventListUnsafePointerBlock

func NewMIDIEventListUnsafePointerBlock(handler MIDIEventListUnsafePointerHandler) (objc.ID, func())

NewMIDIEventListUnsafePointerBlock wraps a Go MIDIEventListUnsafePointerHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

func NewMIDINotifyBlock

func NewMIDINotifyBlock(handler MIDINotifyBlock) (objc.ID, func())

NewMIDINotifyBlock wraps a Go MIDINotifyBlock as an Objective-C block. The caller must defer the returned cleanup function.

func NewMIDIReceiveBlock

func NewMIDIReceiveBlock(handler MIDIReceiveBlock) (objc.ID, func())

NewMIDIReceiveBlock wraps a Go MIDIReceiveBlock as an Objective-C block. The caller must defer the returned cleanup function.

func NewVoidBlock

func NewVoidBlock(handler VoidHandler) (objc.ID, func())

NewVoidBlock wraps a Go VoidHandler as an Objective-C block. The caller must defer the returned cleanup function.

Used by:

  • [MIDICISession.InitWithDiscoveredNodeDataReadyHandlerDisconnectHandler]

Types

type IMIDICIDeviceInfo

type IMIDICIDeviceInfo interface {
	objectivec.IObject

	// The MIDI System Exclusive (SysEx) ID of the device manufacturer.
	ManufacturerID() foundation.NSData
	// The family to which the device belongs.
	Family() foundation.NSData
	// The model number of the device.
	ModelNumber() foundation.NSData
	// The revision number of the device model number.
	RevisionLevel() foundation.NSData
	// The MIDI destination the device’s MIDI entity uses for capability inquiries.
	MidiDestination() MIDIEndpointRef

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the MIDICIDeviceInfo class.

Inspecting a Device

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceInfo

type IMIDICIDeviceManager

type IMIDICIDeviceManager interface {
	objectivec.IObject

	DiscoveredCIDevices() []MIDICIDevice
}

An interface definition for the MIDICIDeviceManager class.

Instance Properties

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceManager

type IMIDICIDiscoveredNode

type IMIDICIDiscoveredNode interface {
	objectivec.IObject

	// The node’s MIDI destination.
	Destination() MIDIEntityRef
	// The available MIDI-CI device information.
	DeviceInfo() IMIDICIDeviceInfo
	// A Boolean value that indicates whether this node supports MIDI-CI profiles.
	SupportsProfiles() bool
	// A Boolean value that indicates whether this node supports MIDI-CI properties.
	SupportsProperties() bool
	// The maximum size of a System Exclusive (SysEx) message this node supports.
	MaximumSysExSize() foundation.NSNumber

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the MIDICIDiscoveredNode class.

Inspecting a Node

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveredNode

type IMIDICIDiscoveryManager

type IMIDICIDiscoveryManager interface {
	objectivec.IObject
}

An interface definition for the MIDICIDiscoveryManager class.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveryManager

type IMIDICIProfile

type IMIDICIProfile interface {
	objectivec.IObject

	// Creates a MIDI profile for the specified data.
	InitWithData(data foundation.NSData) MIDICIProfile
	// Creates a named MIDI profile for the specified data.
	InitWithDataName(data foundation.NSData, inName string) MIDICIProfile

	// A string that describes the profile.
	Name() string
	// The unique five-byte profile identifier that represents the profile.
	ProfileID() foundation.NSData

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the MIDICIProfile class.

Creating a Profile

Inspecting a Profile

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfile

type IMIDICIProfileState

type IMIDICIProfileState interface {
	objectivec.IObject

	// Creates a new profile state object for the specified profiles.
	InitWithEnabledProfilesDisabledProfiles(enabled []MIDICIProfile, disabled []MIDICIProfile) MIDICIProfileState

	// The MIDI channel to which this state applies.
	MidiChannel() MIDIChannelNumber

	// The object’s enabled profiles.
	EnabledProfiles() []MIDICIProfile
	// The object’s disabled profiles.
	DisabledProfiles() []MIDICIProfile

	EncodeWithCoder(coder foundation.INSCoder)
}

An interface definition for the MIDICIProfileState class.

Creating a Profile State

Accessing the MIDI Channel

Accessing Profiles

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileState

type IMIDICIResponder

type IMIDICIResponder interface {
	objectivec.IObject

	// The profile delegate.
	ProfileDelegate() MIDICIProfileResponderDelegate

	// An array of initiators.
	Initiators() []foundation.NSNumber
	// The MIDI-CI device’s information.
	DeviceInfo() IMIDICIDeviceInfo
}

An interface definition for the MIDICIResponder class.

Setting a Responder Delegate

Inspecting a Responder

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIResponder

type IMIDICISession

type IMIDICISession interface {
	objectivec.IObject

	// An optional block the system calls after it enables or disables a profile.
	ProfileChangedCallback() MIDICISessionUint32MIDICIProfileInt32Handler
	SetProfileChangedCallback(value MIDICISessionUint32MIDICIProfileInt32Handler)
	// An optional block the system calls when a device sends profile-specific data to the session.
	ProfileSpecificDataHandler() MIDICISessionUint32MIDICIProfileDataHandler
	SetProfileSpecificDataHandler(value MIDICISessionUint32MIDICIProfileDataHandler)

	// Information about a MIDI-CI device.
	DeviceInfo() IMIDICIDeviceInfo
	// The maximum size of System Exclusive (SysEx) messages.
	MaxSysExSize() foundation.NSNumber
	// The MIDI destination with which the session is communicating.
	MidiDestination() MIDIEntityRef
	// The maximum number of simultaneous property exchange requests, if supported.
	MaxPropertyRequests() foundation.NSNumber
	// A Boolean value that indicates whether the entity supports the MIDI-CI profile’s capability.
	SupportsProfileCapability() bool
	// A Boolean value that indicates whether the entity supports the MIDI-CI property exchange capability.
	SupportsPropertyCapability() bool
}

An interface definition for the MIDICISession class.

Configuring a Session

Inspecting a Session

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession

type IMIDINetworkConnection

type IMIDINetworkConnection interface {
	objectivec.IObject

	// The host connection.
	Host() IMIDINetworkHost
}

An interface definition for the MIDINetworkConnection class.

Accessing Connections

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkConnection

type IMIDINetworkHost

type IMIDINetworkHost interface {
	objectivec.IObject

	// The host name.
	Name() string
	// The net service name.
	NetServiceName() string
	// The net service domain.
	NetServiceDomain() string
	// The host address.
	Address() string
	// The host port.
	Port() uint

	// Compares this host instance with another to see if they share the same address value.
	HasSameAddressAs(other IMIDINetworkHost) bool
}

An interface definition for the MIDINetworkHost class.

Inspecting Host Properties

Comparing Hosts

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost

type IMIDINetworkSession

type IMIDINetworkSession interface {
	objectivec.IObject

	// A Boolean value that determines whether the session is enabled.
	IsEnabled() bool
	SetEnabled(value bool)
	// The policy that determines who can connect to this session.
	ConnectionPolicy() MIDINetworkConnectionPolicy
	SetConnectionPolicy(value MIDINetworkConnectionPolicy)

	// The name of this session’s entity.
	LocalName() string
	// The name with which this session advertises itself over Bonjour.
	NetworkName() string
	// The session’s UDP port.
	NetworkPort() uint
	// Returns the session’s source endpoint.
	SourceEndpoint() MIDIEndpointRef
	// Returns the session’s destination endpoint.
	DestinationEndpoint() MIDIEndpointRef

	// Returns the session’s set of MIDI network connections.
	Connections() foundation.INSSet
	// Adds a new connection to this session.
	AddConnection(connection IMIDINetworkConnection) bool
	// Removes a connection from this session.
	RemoveConnection(connection IMIDINetworkConnection) bool

	// Returns the array of network hosts.
	Contacts() foundation.INSSet
	// Adds a host as a contact.
	AddContact(contact IMIDINetworkHost) bool
	// Removes a host as a contact.
	RemoveContact(contact IMIDINetworkHost) bool
}

An interface definition for the MIDINetworkSession class.

Configuring a Session

Inspecting a Sessions

Managing Connections

Managing Contacts

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession

type IMIDIUMPEndpointManager

type IMIDIUMPEndpointManager interface {
	objectivec.IObject

	UMPEndpoints() []MIDIUMPEndpoint
}

An interface definition for the MIDIUMPEndpointManager class.

Instance Properties

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPEndpointManager

type IMIDIUMPMutableEndpoint

type IMIDIUMPMutableEndpoint interface {
	IMIDIUMPEndpoint

	InitWithNameDeviceInfoProductInstanceIDMIDIProtocolDestinationCallback(name string, deviceInfo IMIDI2DeviceInfo, productInstanceID string, MIDIProtocol MIDIProtocolID, destinationCallback MIDIEventListUnsafePointerHandler) MIDIUMPMutableEndpoint

	IsEnabled() bool
	MutableFunctionBlocks() []MIDIUMPMutableFunctionBlock
	SetMutableFunctionBlocks(value []MIDIUMPMutableFunctionBlock)

	RegisterFunctionBlocksMarkAsStaticError(functionBlocks []MIDIUMPMutableFunctionBlock, markAsStatic bool) (bool, error)
	SetEnabledError(isEnabled bool) (bool, error)
	SetNameError(name string) (bool, error)
}

An interface definition for the MIDIUMPMutableEndpoint class.

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPMutableEndpoint

type KMIDI

type KMIDI int32
const (
	// KMIDIIDNotUnique: The identifier you’re trying to set isn’t unique.
	KMIDIIDNotUnique KMIDI = -10843
	// KMIDIInvalidClient: The client is invalid.
	KMIDIInvalidClient KMIDI = -10830
	// KMIDIInvalidPort: The port is invalid.
	KMIDIInvalidPort KMIDI = -10831
	// KMIDIMessageSendErr: The communication with the MIDI server failed.
	KMIDIMessageSendErr KMIDI = -10838
	// KMIDINoConnection: The connection you’re trying to close doesn’t exist.
	KMIDINoConnection KMIDI = -10833
	// KMIDINoCurrentSetup: A MIDI setup object doesn’t currently exist.
	KMIDINoCurrentSetup KMIDI = -10837
	// KMIDINotPermitted: The process doesn’t have privileges for the requested operation.
	KMIDINotPermitted KMIDI = -10844
	// KMIDIObjectNotFound: The requested object doesn’t exist.
	KMIDIObjectNotFound KMIDI = -10842
	// KMIDIServerStartErr: The system can’t start the MIDI server.
	KMIDIServerStartErr KMIDI = -10839
	// KMIDISetupFormatErr: The system can’t read the saved state.
	KMIDISetupFormatErr KMIDI = -10840
	// KMIDIUnknownEndpoint: The system doesn’t recognize the endpoint.
	KMIDIUnknownEndpoint KMIDI = -10834
	// KMIDIUnknownError: The system can’t perform the requested operation.
	KMIDIUnknownError KMIDI = -10845
	// KMIDIUnknownProperty: The property you’re trying to query isn’t set on the object.
	KMIDIUnknownProperty KMIDI = -10835
	// KMIDIWrongEndpointType: A function received a source endpoint when it required a destination endpoint, or vice versa.
	KMIDIWrongEndpointType KMIDI = -10832
	// KMIDIWrongPropertyType: The value you assigned to the property is the wrong type.
	KMIDIWrongPropertyType KMIDI = -10836
	// KMIDIWrongThread: A driver is calling a non-I/O function in the server from a thread other than the server’s main thread.
	KMIDIWrongThread KMIDI = -10841
)

func (KMIDI) String

func (e KMIDI) String() string

type KmidithruconnectionMaxendpoints

type KmidithruconnectionMaxendpoints uint32
const (
	// KMIDIThruConnection_MaxEndpoints: The maximum number of endpoints for this connection.
	KMIDIThruConnection_MaxEndpoints KmidithruconnectionMaxendpoints = 8
)

func (KmidithruconnectionMaxendpoints) String

type MIDI2DeviceInfo

type MIDI2DeviceInfo struct {
	objectivec.Object
}

Initializers

Instance Properties

See: https://developer.apple.com/documentation/CoreMIDI/MIDI2DeviceInfo

func MIDI2DeviceInfoFromID

func MIDI2DeviceInfoFromID(id objc.ID) MIDI2DeviceInfo

MIDI2DeviceInfoFromID constructs a MIDI2DeviceInfo from an objc.ID.

func NewMIDI2DeviceInfo

func NewMIDI2DeviceInfo() MIDI2DeviceInfo

NewMIDI2DeviceInfo creates a new MIDI2DeviceInfo instance.

func (MIDI2DeviceInfo) Autorelease

func (m MIDI2DeviceInfo) Autorelease() MIDI2DeviceInfo

Autorelease adds the receiver to the current autorelease pool.

func (MIDI2DeviceInfo) Init

Init initializes the instance.

type MIDI2DeviceInfoClass

type MIDI2DeviceInfoClass struct {
	// contains filtered or unexported fields
}

func GetMIDI2DeviceInfoClass

func GetMIDI2DeviceInfoClass() MIDI2DeviceInfoClass

GetMIDI2DeviceInfoClass returns the class object for MIDI2DeviceInfo.

func (MIDI2DeviceInfoClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDI2DeviceInfoClass) Class

func (mc MIDI2DeviceInfoClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDI2DeviceManufacturer

type MIDI2DeviceManufacturer struct {
	SysExIDByte [3]uint8
}

MIDI2DeviceManufacturer

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDI2DeviceManufacturer

type MIDI2DeviceRevisionLevel

type MIDI2DeviceRevisionLevel struct {
	RevisionLevel [4]uint8
}

MIDI2DeviceRevisionLevel

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDI2DeviceRevisionLevel

type MIDICICategoryOptions

type MIDICICategoryOptions uint8

See: https://developer.apple.com/documentation/CoreMIDI/MIDICICategoryOptions

const (
	KMIDICICategoryOptionsProcessInquirySupported       MIDICICategoryOptions = 16
	KMIDICICategoryOptionsProfileConfigurationSupported MIDICICategoryOptions = 4
	KMIDICICategoryOptionsPropertyExchangeSupported     MIDICICategoryOptions = 8
	KMIDICICategoryOptionsProtocolNegotiation           MIDICICategoryOptions = 2
)

func (MIDICICategoryOptions) String

func (e MIDICICategoryOptions) String() string

type MIDICIDevice

type MIDICIDevice struct {
	objectivec.Object
}

Instance Properties

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDevice

func MIDICIDeviceFromID

func MIDICIDeviceFromID(id objc.ID) MIDICIDevice

MIDICIDeviceFromID constructs a MIDICIDevice from an objc.ID.

func NewMIDICIDevice

func NewMIDICIDevice() MIDICIDevice

NewMIDICIDevice creates a new MIDICIDevice instance.

func (MIDICIDevice) Autorelease

func (m MIDICIDevice) Autorelease() MIDICIDevice

Autorelease adds the receiver to the current autorelease pool.

func (MIDICIDevice) Init

func (m MIDICIDevice) Init() MIDICIDevice

Init initializes the instance.

type MIDICIDeviceClass

type MIDICIDeviceClass struct {
	// contains filtered or unexported fields
}

func GetMIDICIDeviceClass

func GetMIDICIDeviceClass() MIDICIDeviceClass

GetMIDICIDeviceClass returns the class object for MIDICIDevice.

func (MIDICIDeviceClass) Alloc

func (mc MIDICIDeviceClass) Alloc() MIDICIDevice

Alloc allocates memory for a new instance of the class.

func (MIDICIDeviceClass) Class

func (mc MIDICIDeviceClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDICIDeviceIdentification

type MIDICIDeviceIdentification struct {
	Manufacturer  [3]uint8 // The MIDI System Exclusive (SysEx) ID of the device manufacturer.
	Family        [2]uint8 // The group of familes to which the device belongs.
	ModelNumber   [2]uint8 // The device model number.
	RevisionLevel [4]uint8 // The revision number of the device model number.
	Reserved      [5]uint8 // A reserved field whose value is always zero.

}

MIDICIDeviceIdentification - A structure that describes a MIDI-CI device.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceIdentification

type MIDICIDeviceInfo

type MIDICIDeviceInfo struct {
	objectivec.Object
}

An object that provides basic information about a MIDI-CI device.

Inspecting a Device

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceInfo

func MIDICIDeviceInfoFromID

func MIDICIDeviceInfoFromID(id objc.ID) MIDICIDeviceInfo

MIDICIDeviceInfoFromID constructs a MIDICIDeviceInfo from an objc.ID.

An object that provides basic information about a MIDI-CI device.

func NewMIDICIDeviceInfo

func NewMIDICIDeviceInfo() MIDICIDeviceInfo

NewMIDICIDeviceInfo creates a new MIDICIDeviceInfo instance.

func NewMIDICIDeviceInfoWithDestinationManufacturerFamilyModelRevision

func NewMIDICIDeviceInfoWithDestinationManufacturerFamilyModelRevision(midiDestination MIDIEntityRef, manufacturer foundation.NSData, family foundation.NSData, modelNumber foundation.NSData, revisionLevel foundation.NSData) MIDICIDeviceInfo

Creates a new device information instance.

midiDestination: The MIDI destination to use for capability inquiry.

manufacturer: The device manufacturer.

family: The family to which this device belongs.

modelNumber: The device’s model number.

revisionLevel: The version of the device’s model number.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceInfo/init(destination:manufacturer:family:model:revision:)

func (MIDICIDeviceInfo) Autorelease

func (m MIDICIDeviceInfo) Autorelease() MIDICIDeviceInfo

Autorelease adds the receiver to the current autorelease pool.

func (MIDICIDeviceInfo) EncodeWithCoder

func (m MIDICIDeviceInfo) EncodeWithCoder(coder foundation.INSCoder)

func (MIDICIDeviceInfo) Family

func (m MIDICIDeviceInfo) Family() foundation.NSData

The family to which the device belongs.

Discussion

This value is 2 bytes long.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceInfo/family

func (MIDICIDeviceInfo) Init

Init initializes the instance.

func (MIDICIDeviceInfo) ManufacturerID

func (m MIDICIDeviceInfo) ManufacturerID() foundation.NSData

The MIDI System Exclusive (SysEx) ID of the device manufacturer.

Discussion

This value is 3 bytes long.

The framework pads single-byte System Exclusive (SysEx) IDs with trailing zeros. For example, Apple’s SysEx ID, 0x11, is `0x110000`.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceInfo/manufacturerID

func (MIDICIDeviceInfo) MidiDestination

func (m MIDICIDeviceInfo) MidiDestination() MIDIEndpointRef

The MIDI destination the device’s MIDI entity uses for capability inquiries.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceInfo/midiDestination

func (MIDICIDeviceInfo) ModelNumber

func (m MIDICIDeviceInfo) ModelNumber() foundation.NSData

The model number of the device.

Discussion

This value is 2 bytes long.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceInfo/modelNumber

func (MIDICIDeviceInfo) RevisionLevel

func (m MIDICIDeviceInfo) RevisionLevel() foundation.NSData

The revision number of the device model number.

Discussion

This value is 2 bytes long.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceInfo/revisionLevel

type MIDICIDeviceInfoClass

type MIDICIDeviceInfoClass struct {
	// contains filtered or unexported fields
}

func GetMIDICIDeviceInfoClass

func GetMIDICIDeviceInfoClass() MIDICIDeviceInfoClass

GetMIDICIDeviceInfoClass returns the class object for MIDICIDeviceInfo.

func (MIDICIDeviceInfoClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDICIDeviceInfoClass) Class

func (mc MIDICIDeviceInfoClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDICIDeviceManager

type MIDICIDeviceManager struct {
	objectivec.Object
}

Instance Properties

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceManager

func MIDICIDeviceManagerFromID

func MIDICIDeviceManagerFromID(id objc.ID) MIDICIDeviceManager

MIDICIDeviceManagerFromID constructs a MIDICIDeviceManager from an objc.ID.

func NewMIDICIDeviceManager

func NewMIDICIDeviceManager() MIDICIDeviceManager

NewMIDICIDeviceManager creates a new MIDICIDeviceManager instance.

func (MIDICIDeviceManager) Autorelease

func (m MIDICIDeviceManager) Autorelease() MIDICIDeviceManager

Autorelease adds the receiver to the current autorelease pool.

func (MIDICIDeviceManager) Init

Init initializes the instance.

type MIDICIDeviceManagerClass

type MIDICIDeviceManagerClass struct {
	// contains filtered or unexported fields
}

func GetMIDICIDeviceManagerClass

func GetMIDICIDeviceManagerClass() MIDICIDeviceManagerClass

GetMIDICIDeviceManagerClass returns the class object for MIDICIDeviceManager.

func (MIDICIDeviceManagerClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDICIDeviceManagerClass) Class

func (mc MIDICIDeviceManagerClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (MIDICIDeviceManagerClass) SharedInstance

func (_MIDICIDeviceManagerClass MIDICIDeviceManagerClass) SharedInstance() MIDICIDeviceManager

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDeviceManager/shared

type MIDICIDiscoveredNode

type MIDICIDiscoveredNode struct {
	objectivec.Object
}

A discovered MIDI-CI node that represents a MIDI source and destination that respond to capability inquiries.

Inspecting a Node

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveredNode

func MIDICIDiscoveredNodeFromID

func MIDICIDiscoveredNodeFromID(id objc.ID) MIDICIDiscoveredNode

MIDICIDiscoveredNodeFromID constructs a MIDICIDiscoveredNode from an objc.ID.

A discovered MIDI-CI node that represents a MIDI source and destination that respond to capability inquiries.

func NewMIDICIDiscoveredNode

func NewMIDICIDiscoveredNode() MIDICIDiscoveredNode

NewMIDICIDiscoveredNode creates a new MIDICIDiscoveredNode instance.

func (MIDICIDiscoveredNode) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (MIDICIDiscoveredNode) Destination

func (m MIDICIDiscoveredNode) Destination() MIDIEntityRef

The node’s MIDI destination.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveredNode/destination

func (MIDICIDiscoveredNode) DeviceInfo

func (m MIDICIDiscoveredNode) DeviceInfo() IMIDICIDeviceInfo

The available MIDI-CI device information.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveredNode/deviceInfo

func (MIDICIDiscoveredNode) EncodeWithCoder

func (m MIDICIDiscoveredNode) EncodeWithCoder(coder foundation.INSCoder)

func (MIDICIDiscoveredNode) Init

Init initializes the instance.

func (MIDICIDiscoveredNode) MaximumSysExSize

func (m MIDICIDiscoveredNode) MaximumSysExSize() foundation.NSNumber

The maximum size of a System Exclusive (SysEx) message this node supports.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveredNode/maximumSysExSize

func (MIDICIDiscoveredNode) SupportsProfiles

func (m MIDICIDiscoveredNode) SupportsProfiles() bool

A Boolean value that indicates whether this node supports MIDI-CI profiles.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveredNode/supportsProfiles

func (MIDICIDiscoveredNode) SupportsProperties

func (m MIDICIDiscoveredNode) SupportsProperties() bool

A Boolean value that indicates whether this node supports MIDI-CI properties.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveredNode/supportsProperties

type MIDICIDiscoveredNodeArrayHandler

type MIDICIDiscoveredNodeArrayHandler = func(*[]MIDICIDiscoveredNode)

MIDICIDiscoveredNodeArrayHandler handles A closure the system calls when a MIDI-CI node discovery request is complete.

Used by:

  • [MIDICIDiscoveryManager.DiscoverWithHandler]

type MIDICIDiscoveredNodeClass

type MIDICIDiscoveredNodeClass struct {
	// contains filtered or unexported fields
}

func GetMIDICIDiscoveredNodeClass

func GetMIDICIDiscoveredNodeClass() MIDICIDiscoveredNodeClass

GetMIDICIDiscoveredNodeClass returns the class object for MIDICIDiscoveredNode.

func (MIDICIDiscoveredNodeClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDICIDiscoveredNodeClass) Class

Class returns the underlying Objective-C class pointer.

type MIDICIDiscoveryManager

type MIDICIDiscoveryManager struct {
	objectivec.Object
}

A singleton object that performs systemwide MIDI-CI discovery.

Overview

Use this class to retrieve information about MIDI-CI–capable nodes in the MIDI subsystem. You can create MIDICISession objects only from the destinations discovered using this API.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveryManager

func MIDICIDiscoveryManagerFromID

func MIDICIDiscoveryManagerFromID(id objc.ID) MIDICIDiscoveryManager

MIDICIDiscoveryManagerFromID constructs a MIDICIDiscoveryManager from an objc.ID.

A singleton object that performs systemwide MIDI-CI discovery.

func NewMIDICIDiscoveryManager

func NewMIDICIDiscoveryManager() MIDICIDiscoveryManager

NewMIDICIDiscoveryManager creates a new MIDICIDiscoveryManager instance.

func (MIDICIDiscoveryManager) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (MIDICIDiscoveryManager) Init

Init initializes the instance.

type MIDICIDiscoveryManagerClass

type MIDICIDiscoveryManagerClass struct {
	// contains filtered or unexported fields
}

func GetMIDICIDiscoveryManagerClass

func GetMIDICIDiscoveryManagerClass() MIDICIDiscoveryManagerClass

GetMIDICIDiscoveryManagerClass returns the class object for MIDICIDiscoveryManager.

func (MIDICIDiscoveryManagerClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDICIDiscoveryManagerClass) Class

Class returns the underlying Objective-C class pointer.

type MIDICIDiscoveryResponseBlock deprecated

type MIDICIDiscoveryResponseBlock = func(discoveredNodes []MIDICIDiscoveredNode)

MIDICIDiscoveryResponseBlock is a block the system calls when a MIDI-CI node discovery request completes.

Deprecated: Deprecated since macOS 15.0. No longer supported for CoreMIDI

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIDiscoveryResponseBlock

type MIDICIInitiatiorMUID

type MIDICIInitiatiorMUID = *foundation.NSNumber

MIDICIInitiatiorMUID is the unique MIDI-CI negotiation identifier to use for a responder connection.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIInitiatiorMUID

type MIDICIProfile

type MIDICIProfile struct {
	objectivec.Object
}

A mapping of MIDI messages to specific sounds and synthesis behaviors, such as General MIDI, a drawbar organ, and so on.

Creating a Profile

Inspecting a Profile

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfile

func MIDICIProfileFromID

func MIDICIProfileFromID(id objc.ID) MIDICIProfile

MIDICIProfileFromID constructs a MIDICIProfile from an objc.ID.

A mapping of MIDI messages to specific sounds and synthesis behaviors, such as General MIDI, a drawbar organ, and so on.

func NewMIDICIProfile

func NewMIDICIProfile() MIDICIProfile

NewMIDICIProfile creates a new MIDICIProfile instance.

func NewMIDICIProfileWithData

func NewMIDICIProfileWithData(data foundation.NSData) MIDICIProfile

Creates a MIDI profile for the specified data.

data: The profile’s unique byte sequence.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfile/init(data:)

func NewMIDICIProfileWithDataName

func NewMIDICIProfileWithDataName(data foundation.NSData, inName string) MIDICIProfile

Creates a named MIDI profile for the specified data.

data: The profile’s unique byte sequence.

inName: The profile name.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfile/init(data:name:)

func (MIDICIProfile) Autorelease

func (m MIDICIProfile) Autorelease() MIDICIProfile

Autorelease adds the receiver to the current autorelease pool.

func (MIDICIProfile) EncodeWithCoder

func (m MIDICIProfile) EncodeWithCoder(coder foundation.INSCoder)

func (MIDICIProfile) Init

func (m MIDICIProfile) Init() MIDICIProfile

Init initializes the instance.

func (MIDICIProfile) InitWithData

func (m MIDICIProfile) InitWithData(data foundation.NSData) MIDICIProfile

Creates a MIDI profile for the specified data.

data: The profile’s unique byte sequence.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfile/init(data:)

func (MIDICIProfile) InitWithDataName

func (m MIDICIProfile) InitWithDataName(data foundation.NSData, inName string) MIDICIProfile

Creates a named MIDI profile for the specified data.

data: The profile’s unique byte sequence.

inName: The profile name.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfile/init(data:name:)

func (MIDICIProfile) Name

func (m MIDICIProfile) Name() string

A string that describes the profile.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfile/name

func (MIDICIProfile) ProfileID

func (m MIDICIProfile) ProfileID() foundation.NSData

The unique five-byte profile identifier that represents the profile.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfile/profileID

type MIDICIProfileChangedBlock deprecated

type MIDICIProfileChangedBlock = func(session MIDICISession, channel uint32, profile MIDICIProfile, enabled int32)

MIDICIProfileChangedBlock is a block the system calls to indicate it has enabled or disabled a profile.

Deprecated: Deprecated since macOS 15.0. No longer supported for CoreMIDI

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileChangedBlock

type MIDICIProfileClass

type MIDICIProfileClass struct {
	// contains filtered or unexported fields
}

func GetMIDICIProfileClass

func GetMIDICIProfileClass() MIDICIProfileClass

GetMIDICIProfileClass returns the class object for MIDICIProfile.

func (MIDICIProfileClass) Alloc

func (mc MIDICIProfileClass) Alloc() MIDICIProfile

Alloc allocates memory for a new instance of the class.

func (MIDICIProfileClass) Class

func (mc MIDICIProfileClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDICIProfileID

type MIDICIProfileID [5]byte

MIDICIProfileID is a C union type.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileID

func (*MIDICIProfileID) ManufacturerSpecific

func (u *MIDICIProfileID) ManufacturerSpecific() *MIDICIProfileIDManufacturerSpecific

ManufacturerSpecific returns the union interpreted as *MIDICIProfileIDManufacturerSpecific. The returned pointer aliases the receiver's memory.

func (*MIDICIProfileID) Standard

Standard returns the union interpreted as *MIDICIProfileIDStandard. The returned pointer aliases the receiver's memory.

type MIDICIProfileIDManufacturerSpecific

type MIDICIProfileIDManufacturerSpecific struct {
	SysExID1 MIDIUInteger7
	SysExID2 MIDIUInteger7
	SysExID3 MIDIUInteger7
	Info1    MIDIUInteger7
	Info2    MIDIUInteger7
}

MIDICIProfileIDManufacturerSpecific

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileIDManufacturerSpecific

type MIDICIProfileIDStandard

type MIDICIProfileIDStandard struct {
	ProfileIDByte1 MIDIUInteger7
	ProfileBank    MIDIUInteger7
	ProfileNumber  MIDIUInteger7
	ProfileVersion MIDIUInteger7
	ProfileLevel   MIDIUInteger7
}

MIDICIProfileIDStandard

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileIDStandard

type MIDICIProfileResponderDelegate

type MIDICIProfileResponderDelegate interface {
	objectivec.IObject

	// Enables a MIDI-CI initiator to create a session or reject the connection attempt.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileResponderDelegate/connectInitiator(_:with:)
	ConnectInitiatorWithDeviceInfo(initiatorMUID MIDICIInitiatiorMUID, deviceInfo IMIDICIDeviceInfo) bool
}

A protocol that defines the methods to respond to MIDI-CI responder life-cycle events.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileResponderDelegate

type MIDICIProfileResponderDelegateConfig

type MIDICIProfileResponderDelegateConfig struct {

	// Protocol Methods
	// WillSetProfileOnChannelEnabled — Provides an opportunity to perform an action before the system sets the profile.
	WillSetProfileOnChannelEnabled func(aProfile MIDICIProfile, channel MIDIChannelNumber, shouldEnable bool) bool
	// InitiatorDisconnected — Provides an opportunity to perform an action after the system disconnects the initiator.
	InitiatorDisconnected func(initiatorMUID MIDICIInitiatiorMUID)

	// Other Methods
	// ConnectInitiatorWithDeviceInfo — Enables a MIDI-CI initiator to create a session or reject the connection attempt.
	ConnectInitiatorWithDeviceInfo func(initiatorMUID MIDICIInitiatiorMUID, deviceInfo MIDICIDeviceInfo) bool
	// HandleDataForProfileOnChannelData — Processes MIDI data for a profile and channel.
	HandleDataForProfileOnChannelData func(aProfile MIDICIProfile, channel MIDIChannelNumber, inData foundation.NSData)
}

MIDICIProfileResponderDelegateConfig holds optional typed callbacks for MIDICIProfileResponderDelegate methods. Set non-nil fields to register the corresponding Objective-C delegate method. Methods with nil callbacks are not registered, so [NSObject.RespondsToSelector] returns false for them — matching the Objective-C delegate pattern exactly.

See Apple Documentation for protocol details.

type MIDICIProfileResponderDelegateObject

type MIDICIProfileResponderDelegateObject struct {
	objectivec.Object
}

MIDICIProfileResponderDelegateObject wraps an existing Objective-C object that conforms to the MIDICIProfileResponderDelegate protocol.

func MIDICIProfileResponderDelegateObjectFromID

func MIDICIProfileResponderDelegateObjectFromID(id objc.ID) MIDICIProfileResponderDelegateObject

MIDICIProfileResponderDelegateObjectFromID constructs a MIDICIProfileResponderDelegateObject from an objc.ID. The object is determined to conform to the protocol at runtime.

func NewMIDICIProfileResponderDelegate

func NewMIDICIProfileResponderDelegate(config MIDICIProfileResponderDelegateConfig) MIDICIProfileResponderDelegateObject

NewMIDICIProfileResponderDelegate creates an Objective-C object implementing the MIDICIProfileResponderDelegate protocol.

Each call registers a unique Objective-C class containing only the methods set in config. This means [NSObject.RespondsToSelector] works correctly for optional delegate methods — only non-nil callbacks are registered.

The returned MIDICIProfileResponderDelegateObject satisfies the MIDICIProfileResponderDelegate interface and can be passed directly to SetDelegate and similar methods.

See Apple Documentation for protocol details.

func (MIDICIProfileResponderDelegateObject) BaseObject

func (MIDICIProfileResponderDelegateObject) ConnectInitiatorWithDeviceInfo

func (o MIDICIProfileResponderDelegateObject) ConnectInitiatorWithDeviceInfo(initiatorMUID MIDICIInitiatiorMUID, deviceInfo IMIDICIDeviceInfo) bool

Enables a MIDI-CI initiator to create a session or reject the connection attempt.

initiatorMUID: The ID of the MIDI-CI initiator.

deviceInfo: The information that describes a device.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileResponderDelegate/connectInitiator(_:with:)

func (MIDICIProfileResponderDelegateObject) HandleDataForProfileOnChannelData

func (o MIDICIProfileResponderDelegateObject) HandleDataForProfileOnChannelData(aProfile IMIDICIProfile, channel MIDIChannelNumber, inData foundation.NSData)

Processes MIDI data for a profile and channel.

aProfile: The MIDI-CI profile.

channel: The MIDI channel.

inData: The data to process.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileResponderDelegate/handleData(for:onChannel:data:)

func (MIDICIProfileResponderDelegateObject) WillSetProfileOnChannelEnabled

func (o MIDICIProfileResponderDelegateObject) WillSetProfileOnChannelEnabled(aProfile IMIDICIProfile, channel MIDIChannelNumber, shouldEnable bool) bool

Provides an opportunity to perform an action before the system sets the profile.

aProfile: The profile the system uses to configure the device.

channel: The MIDI channel assignment.

shouldEnable: A Booean value that indicates whether the system should enable the profile.

Return Value

A Boolean value that indicates whether the system enabled the profile.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileResponderDelegate/willSetProfile(_:onChannel:enabled:)

type MIDICIProfileSpecificDataBlock deprecated

type MIDICIProfileSpecificDataBlock = func(session MIDICISession, channel uint32, profile MIDICIProfile, profileSpecificData foundation.NSData)

MIDICIProfileSpecificDataBlock is a block the system calls when a MIDI-CI session or responder receives profile-specific data.

Deprecated: Deprecated since macOS 15.0. No longer supported for CoreMIDI

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileSpecificDataBlock

type MIDICIProfileState

type MIDICIProfileState struct {
	objectivec.Object
}

An object that provides the enabled and disabled profiles for a MIDI channel or port on a device.

Creating a Profile State

Accessing the MIDI Channel

Accessing Profiles

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileState

func MIDICIProfileStateFromID

func MIDICIProfileStateFromID(id objc.ID) MIDICIProfileState

MIDICIProfileStateFromID constructs a MIDICIProfileState from an objc.ID.

An object that provides the enabled and disabled profiles for a MIDI channel or port on a device.

func NewMIDICIProfileState

func NewMIDICIProfileState() MIDICIProfileState

NewMIDICIProfileState creates a new MIDICIProfileState instance.

func NewMIDICIProfileStateWithChannelEnabledProfilesDisabledProfiles

func NewMIDICIProfileStateWithChannelEnabledProfilesDisabledProfiles(midiChannelNum MIDIChannelNumber, enabled []MIDICIProfile, disabled []MIDICIProfile) MIDICIProfileState

Creates a new profile state object for the specified MIDI channel and profiles.

midiChannelNum: The MIDI channel.

enabled: The enabled MIDI-CI profles.

disabled: The disabled MIDI-CI profles.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileState/init(channel:enabledProfiles:disabledProfiles:)

func NewMIDICIProfileStateWithEnabledProfilesDisabledProfiles

func NewMIDICIProfileStateWithEnabledProfilesDisabledProfiles(enabled []MIDICIProfile, disabled []MIDICIProfile) MIDICIProfileState

Creates a new profile state object for the specified profiles.

enabled: The enabled MIDI-CI profiles.

disabled: The disabled MIDI-CI profiles.

Return Value

A new profile state instance.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileState/init(enabledProfiles:disabledProfiles:)

func (MIDICIProfileState) Autorelease

func (m MIDICIProfileState) Autorelease() MIDICIProfileState

Autorelease adds the receiver to the current autorelease pool.

func (MIDICIProfileState) DisabledProfiles

func (m MIDICIProfileState) DisabledProfiles() []MIDICIProfile

The object’s disabled profiles.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileState/disabledProfiles

func (MIDICIProfileState) EnabledProfiles

func (m MIDICIProfileState) EnabledProfiles() []MIDICIProfile

The object’s enabled profiles.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileState/enabledProfiles

func (MIDICIProfileState) EncodeWithCoder

func (m MIDICIProfileState) EncodeWithCoder(coder foundation.INSCoder)

func (MIDICIProfileState) Init

Init initializes the instance.

func (MIDICIProfileState) InitWithEnabledProfilesDisabledProfiles

func (m MIDICIProfileState) InitWithEnabledProfilesDisabledProfiles(enabled []MIDICIProfile, disabled []MIDICIProfile) MIDICIProfileState

Creates a new profile state object for the specified profiles.

enabled: The enabled MIDI-CI profiles.

disabled: The disabled MIDI-CI profiles.

Return Value

A new profile state instance.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileState/init(enabledProfiles:disabledProfiles:)

func (MIDICIProfileState) MidiChannel

func (m MIDICIProfileState) MidiChannel() MIDIChannelNumber

The MIDI channel to which this state applies.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileState/midiChannel

type MIDICIProfileStateClass

type MIDICIProfileStateClass struct {
	// contains filtered or unexported fields
}

func GetMIDICIProfileStateClass

func GetMIDICIProfileStateClass() MIDICIProfileStateClass

GetMIDICIProfileStateClass returns the class object for MIDICIProfileState.

func (MIDICIProfileStateClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDICIProfileStateClass) Class

func (mc MIDICIProfileStateClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDICIProfileStateList

type MIDICIProfileStateList = []*MIDICIProfileState

MIDICIProfileStateList is an array of profile state objects that describes the profile configuration for all channels of a reachable MIDI-CI node.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIProfileStateList

type MIDICIResponder

type MIDICIResponder struct {
	objectivec.Object
}

An object that responds to MIDI-CI inquiries from an initiator on behalf of a MIDI client, and handles profile and property exchange operations.

Setting a Responder Delegate

Inspecting a Responder

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIResponder

func MIDICIResponderFromID

func MIDICIResponderFromID(id objc.ID) MIDICIResponder

MIDICIResponderFromID constructs a MIDICIResponder from an objc.ID.

An object that responds to MIDI-CI inquiries from an initiator on behalf of a MIDI client, and handles profile and property exchange operations.

func NewMIDICIResponder

func NewMIDICIResponder() MIDICIResponder

NewMIDICIResponder creates a new MIDICIResponder instance.

func NewMIDICIResponderWithDeviceInfoProfileDelegateProfileStatesSupportProperties

func NewMIDICIResponderWithDeviceInfoProfileDelegateProfileStatesSupportProperties(deviceInfo IMIDICIDeviceInfo, delegate MIDICIProfileResponderDelegate, profileList MIDICIProfileStateList, propertiesSupported bool) MIDICIResponder

Creates a new responder.

deviceInfo: The MIDI-CI device information.

delegate: The responder’s delegate object.

profileList: The list of profile state objects.

propertiesSupported: A Boolean value that indicates whether the responder supports properties.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIResponder/init(deviceInfo:profileDelegate:profileStates:supportProperties:)

func (MIDICIResponder) Autorelease

func (m MIDICIResponder) Autorelease() MIDICIResponder

Autorelease adds the receiver to the current autorelease pool.

func (MIDICIResponder) DeviceInfo

func (m MIDICIResponder) DeviceInfo() IMIDICIDeviceInfo

The MIDI-CI device’s information.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIResponder/deviceInfo

func (MIDICIResponder) Init

Init initializes the instance.

func (MIDICIResponder) Initiators

func (m MIDICIResponder) Initiators() []foundation.NSNumber

An array of initiators.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICIResponder/initiators

type MIDICIResponderClass

type MIDICIResponderClass struct {
	// contains filtered or unexported fields
}

func GetMIDICIResponderClass

func GetMIDICIResponderClass() MIDICIResponderClass

GetMIDICIResponderClass returns the class object for MIDICIResponder.

func (MIDICIResponderClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDICIResponderClass) Class

func (mc MIDICIResponderClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDICISession

type MIDICISession struct {
	objectivec.Object
}

An object that represents a MIDI-CI session.

Overview

A MIDI-CI session is a bidirectional communication path between a MIDI source and destination identified using MIDI-CI discovery. Use a session to manipulate MIDI-CI profiles and to discover device capabilities.

Configuring a Session

Inspecting a Session

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession

func MIDICISessionFromID

func MIDICISessionFromID(id objc.ID) MIDICISession

MIDICISessionFromID constructs a MIDICISession from an objc.ID.

An object that represents a MIDI-CI session.

func NewMIDICISession

func NewMIDICISession() MIDICISession

NewMIDICISession creates a new MIDICISession instance.

func (MIDICISession) Autorelease

func (m MIDICISession) Autorelease() MIDICISession

Autorelease adds the receiver to the current autorelease pool.

func (MIDICISession) DeviceInfo

func (m MIDICISession) DeviceInfo() IMIDICIDeviceInfo

Information about a MIDI-CI device.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession/deviceInfo

func (MIDICISession) Init

func (m MIDICISession) Init() MIDICISession

Init initializes the instance.

func (MIDICISession) MaxPropertyRequests

func (m MIDICISession) MaxPropertyRequests() foundation.NSNumber

The maximum number of simultaneous property exchange requests, if supported.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession/maxPropertyRequests

func (MIDICISession) MaxSysExSize

func (m MIDICISession) MaxSysExSize() foundation.NSNumber

The maximum size of System Exclusive (SysEx) messages.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession/maxSysExSize

func (MIDICISession) MidiDestination

func (m MIDICISession) MidiDestination() MIDIEntityRef

The MIDI destination with which the session is communicating.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession/midiDestination

func (MIDICISession) ProfileChangedCallback

An optional block the system calls after it enables or disables a profile.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession/profileChangedCallback

func (MIDICISession) ProfileSpecificDataHandler

func (m MIDICISession) ProfileSpecificDataHandler() MIDICISessionUint32MIDICIProfileDataHandler

An optional block the system calls when a device sends profile-specific data to the session.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession/profileSpecificDataHandler

func (MIDICISession) SetProfileChangedCallback

func (m MIDICISession) SetProfileChangedCallback(value MIDICISessionUint32MIDICIProfileInt32Handler)

func (MIDICISession) SetProfileSpecificDataHandler

func (m MIDICISession) SetProfileSpecificDataHandler(value MIDICISessionUint32MIDICIProfileDataHandler)

func (MIDICISession) SupportsProfileCapability

func (m MIDICISession) SupportsProfileCapability() bool

A Boolean value that indicates whether the entity supports the MIDI-CI profile’s capability.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession/supportsProfileCapability

func (MIDICISession) SupportsPropertyCapability

func (m MIDICISession) SupportsPropertyCapability() bool

A Boolean value that indicates whether the entity supports the MIDI-CI property exchange capability.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISession/supportsPropertyCapability

type MIDICISessionClass

type MIDICISessionClass struct {
	// contains filtered or unexported fields
}

func GetMIDICISessionClass

func GetMIDICISessionClass() MIDICISessionClass

GetMIDICISessionClass returns the class object for MIDICISession.

func (MIDICISessionClass) Alloc

func (mc MIDICISessionClass) Alloc() MIDICISession

Alloc allocates memory for a new instance of the class.

func (MIDICISessionClass) Class

func (mc MIDICISessionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDICISessionDisconnectBlock deprecated

type MIDICISessionDisconnectBlock = func(session MIDICISession, error_ foundation.NSError)

MIDICISessionDisconnectBlock is a block the system calls when a MIDI-CI session disconnects.

Deprecated: Deprecated since macOS 15.0. No longer supported for CoreMIDI

See: https://developer.apple.com/documentation/CoreMIDI/MIDICISessionDisconnectBlock

type MIDICISessionErrorHandler

type MIDICISessionErrorHandler = func(*MIDICISession, error)

MIDICISessionErrorHandler handles A block the system calls when you disconnect from the session. The error can be type-asserted to *foundation.NSError for Domain, Code, and UserInfo.

Used by:

  • [MIDICISession.InitWithDiscoveredNodeDataReadyHandlerDisconnectHandler]

type MIDICISessionUint32MIDICIProfileDataHandler

type MIDICISessionUint32MIDICIProfileDataHandler = func(*MIDICISession, uint32, *MIDICIProfile, *foundation.NSData)

MIDICISessionUint32MIDICIProfileDataHandler is the signature for a completion handler block.

type MIDICISessionUint32MIDICIProfileInt32Handler

type MIDICISessionUint32MIDICIProfileInt32Handler = func(*MIDICISession, uint32, *MIDICIProfile, int32)

MIDICISessionUint32MIDICIProfileInt32Handler is the signature for a completion handler block.

type MIDIChannelNumber

type MIDIChannelNumber = uint8

See: https://developer.apple.com/documentation/CoreMIDI/MIDIChannelNumber

const (

	// MIDIChannelsWholePort is a constant value that indicates to use all channels of the port.
	//
	// See: https://developer.apple.com/documentation/CoreMIDI/MIDIChannelsWholePort
	MIDIChannelsWholePort MIDIChannelNumber = 0x7
)

MIDIChannelNumber values.

type MIDIClientRef

type MIDIClientRef = uint32

MIDIClientRef is an object that maintains per-client state.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIClientRef

type MIDICompletionProc

type MIDICompletionProc = func(request uintptr)

MIDICompletionProc is a function the system calls after it completely sends a system-exclusive (SysEx) event.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICompletionProc

type MIDICompletionProcUMP

type MIDICompletionProcUMP = func(request uintptr)

MIDICompletionProcUMP is a function the system calls after it completely sends a UMP system-exclusive (SysEx) or SysEx 8-bit event.

See: https://developer.apple.com/documentation/CoreMIDI/MIDICompletionProcUMP

type MIDIControlTransform

type MIDIControlTransform struct {
	ControlType         MIDITransformControlType // The type of control specified by the control number.
	RemappedControlType MIDITransformControlType // The remapped control type.
	ControlNumber       uint16                   // The control number to affect.
	Transform           MIDITransformType        // The type of transformation to apply to the event values.
	Param               int16                    // An argument to the transformation method.

}

MIDIControlTransform - A structure that describes the transformation of MIDI control change events.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIControlTransform

type MIDIDeviceListRef

type MIDIDeviceListRef = uint32

MIDIDeviceListRef is a list of MIDI devices.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceListRef

func MIDIGetDriverDeviceList

func MIDIGetDriverDeviceList(driver MIDIDriverRef) MIDIDeviceListRef

MIDIGetDriverDeviceList returns the list of driver-created devices in the current MIDI setup.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetDriverDeviceList(_:)

type MIDIDeviceRef

type MIDIDeviceRef = uint32

MIDIDeviceRef is a MIDI device that contains entities.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceRef

func MIDIDeviceListGetDevice

func MIDIDeviceListGetDevice(devList MIDIDeviceListRef, index0 uint) MIDIDeviceRef

MIDIDeviceListGetDevice retrieves a MIDI device from a device list.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceListGetDevice(_:_:)

func MIDIGetDevice

func MIDIGetDevice(deviceIndex0 uint) MIDIDeviceRef

MIDIGetDevice returns a device from the system.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetDevice(_:)

func MIDIGetExternalDevice

func MIDIGetExternalDevice(deviceIndex0 uint) MIDIDeviceRef

MIDIGetExternalDevice returns one of the external devices in the system.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetExternalDevice(_:)

type MIDIDriverInterface

type MIDIDriverInterface struct {
	QueryInterface func(unsafe.Pointer, corefoundation.CFUUIDBytes, unsafe.Pointer) int32
	AddRef         func(unsafe.Pointer) uint32
	Release        func(unsafe.Pointer) uint32
	FindDevices    func(uintptr, uint32) int32                                  // Finds the available devices.
	Start          func(uintptr, uint32) int32                                  // Starts MIDI I/O.
	Stop           func(uintptr) int32                                          // Stops MIDI I/O.
	Configure      func(uintptr, uint32) int32                                  // The system doesn’t currently use this method.
	Send           func(uintptr, uintptr, unsafe.Pointer, unsafe.Pointer) int32 // Sends a MIDI packet list to the specified destination endpoints.
	EnableSource   func(uintptr, uint32, uint8) int32                           // Tells the driver whether input from a particular source has listeners.
	Flush          func(uintptr, uint32, unsafe.Pointer, unsafe.Pointer) int32  // Unschedules all pending output to the specified destination.
	Monitor        func(uintptr, uint32, uintptr) int32                         // Enables monitoring of MIDI packet lists by the specified driver.
	SendPackets    func(uintptr, uintptr, unsafe.Pointer, unsafe.Pointer) int32 // Sends a MIDI event list to the specified destination endpoints.
	MonitorEvents  func(uintptr, uint32, uintptr) int32                         // Enables monitoring of MIDI event lists by the specified driver.
	// contains filtered or unexported fields
}

MIDIDriverInterface - The interface to a MIDI driver.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIDriverInterface

type MIDIDriverRef

type MIDIDriverRef = **MIDIDriverInterface

MIDIDriverRef is a MIDI driver object.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDriverRef

type MIDIEndpointRef

type MIDIEndpointRef = uint32

MIDIEndpointRef is a MIDI source or destination an entity owns.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEndpointRef

func MIDIEntityGetDestination

func MIDIEntityGetDestination(entity MIDIEntityRef, destIndex0 uint) MIDIEndpointRef

MIDIEntityGetDestination returns one of an entity’s destinations.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEntityGetDestination(_:_:)

func MIDIEntityGetSource

func MIDIEntityGetSource(entity MIDIEntityRef, sourceIndex0 uint) MIDIEndpointRef

MIDIEntityGetSource returns one of an entity’s sources.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEntityGetSource(_:_:)

func MIDIGetDestination

func MIDIGetDestination(destIndex0 uint) MIDIEndpointRef

MIDIGetDestination returns a destination in the system.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetDestination(_:)

func MIDIGetSource

func MIDIGetSource(sourceIndex0 uint) MIDIEndpointRef

MIDIGetSource returns a source in the system.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIGetSource(_:)

type MIDIEntityRef

type MIDIEntityRef = uint32

MIDIEntityRef is an entity that a device owns and that contains endpoints.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEntityRef

func MIDIDeviceGetEntity

func MIDIDeviceGetEntity(device MIDIDeviceRef, entityIndex0 uint) MIDIEntityRef

MIDIDeviceGetEntity returns the device’s entity at a specific index.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIDeviceGetEntity(_:_:)

type MIDIEventList

type MIDIEventList struct {
	Protocol   MIDIProtocolID     // The MIDI protocol variant of the events in the list.
	NumPackets uint32             // The number of MIDI event packet structures in the list.
	Packet     [1]MIDIEventPacket // An array of variable-length MIDI event packet structures.

}

MIDIEventList - A variable-length list of MIDI event packets.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIEventList

type MIDIEventListUnsafePointerHandler

type MIDIEventListUnsafePointerHandler = func(*MIDIEventList, unsafe.Pointer)

MIDIEventListUnsafePointerHandler handles completion with primitive and object results.

Used by:

type MIDIEventPacket

type MIDIEventPacket struct {
	// contains filtered or unexported fields
}

MIDIEventPacket - A series of simultaneous MIDI events in Universal MIDI Packets (UMP) format.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIEventPacket

func MIDIEventListAdd

func MIDIEventListAdd(evtlist *MIDIEventList, listSize uint, curPacket *MIDIEventPacket, time MIDITimeStamp, wordCount uint, words *uint32) *MIDIEventPacket

MIDIEventListAdd adds an event to an event list.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEventListAdd(_:_:_:_:_:_:)

func MIDIEventListInit

func MIDIEventListInit(evtlist *MIDIEventList, protocol_ MIDIProtocolID) *MIDIEventPacket

MIDIEventListInit initializes an event list.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIEventListInit(_:_:)

func (*MIDIEventPacket) SetTimeStamp

func (s *MIDIEventPacket) SetTimeStamp(v MIDITimeStamp)

SetTimeStamp updates the TimeStamp field in the record's packed storage.

func (*MIDIEventPacket) SetWordCount

func (s *MIDIEventPacket) SetWordCount(v uint32)

SetWordCount updates the WordCount field in the record's packed storage.

func (*MIDIEventPacket) SetWords

func (s *MIDIEventPacket) SetWords(v [64]uint32)

SetWords updates the Words field in the record's packed storage.

func (*MIDIEventPacket) TimeStamp

func (s *MIDIEventPacket) TimeStamp() MIDITimeStamp

TimeStamp returns the TimeStamp field from the record's packed storage.

func (*MIDIEventPacket) WordCount

func (s *MIDIEventPacket) WordCount() uint32

WordCount returns the WordCount field from the record's packed storage.

func (*MIDIEventPacket) Words

func (s *MIDIEventPacket) Words() [64]uint32

Words returns the Words field from the record's packed storage.

type MIDIIOErrorNotification

type MIDIIOErrorNotification struct {
	MessageID    MIDINotificationMessageID // The type of message.
	MessageSize  uint32                    // The size of the message.
	DriverDevice MIDIDeviceRef             // The device with an I/O error.
	ErrorCode    int32                     // The error code of the generated error.

}

MIDIIOErrorNotification - A general I/O error notification.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIIOErrorNotification

type MIDIMessage32

type MIDIMessage32 = MIDIMessage_32

MIDIMessage32 is a Go-name alias for MIDIMessage_32.

type MIDIMessage_32

type MIDIMessage_32 = uint32

MIDIMessage_32 is a 32-bit MIDI message.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIMessage_32

type MIDIMessage_64

type MIDIMessage_64 struct {
	Word0 uint32
	Word1 uint32
}

MIDIMessage_64 - A 64-bit MIDI message.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIMessage_64

type MIDIMessage_96

type MIDIMessage_96 struct {
	Word0 uint32
	Word1 uint32
	Word2 uint32
}

MIDIMessage_96 - A 96-bit MIDI message.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIMessage_96

type MIDIMessage_128

type MIDIMessage_128 struct {
	Word0 uint32
	Word1 uint32
	Word2 uint32
	Word3 uint32
}

MIDIMessage_128 - A 128-bit MIDI message.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIMessage_128

type MIDINetworkConnection

type MIDINetworkConnection struct {
	objectivec.Object
}

An object that connects a session to a host.

Accessing Connections

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkConnection

func MIDINetworkConnectionFromID

func MIDINetworkConnectionFromID(id objc.ID) MIDINetworkConnection

MIDINetworkConnectionFromID constructs a MIDINetworkConnection from an objc.ID.

An object that connects a session to a host.

func NewMIDINetworkConnection

func NewMIDINetworkConnection() MIDINetworkConnection

NewMIDINetworkConnection creates a new MIDINetworkConnection instance.

func NewMIDINetworkConnectionWithHost

func NewMIDINetworkConnectionWithHost(host IMIDINetworkHost) MIDINetworkConnection

Creates a connection to the specified host.

host: The host with which to establish a connection.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkConnection/init(host:)

func (MIDINetworkConnection) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (MIDINetworkConnection) Init

Init initializes the instance.

type MIDINetworkConnectionClass

type MIDINetworkConnectionClass struct {
	// contains filtered or unexported fields
}

func GetMIDINetworkConnectionClass

func GetMIDINetworkConnectionClass() MIDINetworkConnectionClass

GetMIDINetworkConnectionClass returns the class object for MIDINetworkConnection.

func (MIDINetworkConnectionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDINetworkConnectionClass) Class

Class returns the underlying Objective-C class pointer.

type MIDINetworkConnectionPolicy

type MIDINetworkConnectionPolicy uint

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkConnectionPolicy

const (
	MIDINetworkConnectionPolicy_Anyone             MIDINetworkConnectionPolicy = 2
	MIDINetworkConnectionPolicy_HostsInContactList MIDINetworkConnectionPolicy = 1
	MIDINetworkConnectionPolicy_NoOne              MIDINetworkConnectionPolicy = 0
)

func (MIDINetworkConnectionPolicy) String

type MIDINetworkHost

type MIDINetworkHost struct {
	objectivec.Object
}

An object that represents the host’s network address.

Inspecting Host Properties

Comparing Hosts

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost

func MIDINetworkHostFromID

func MIDINetworkHostFromID(id objc.ID) MIDINetworkHost

MIDINetworkHostFromID constructs a MIDINetworkHost from an objc.ID.

An object that represents the host’s network address.

func NewMIDINetworkHost

func NewMIDINetworkHost() MIDINetworkHost

NewMIDINetworkHost creates a new MIDINetworkHost instance.

func NewMIDINetworkHostWithNameAddressPort

func NewMIDINetworkHostWithNameAddressPort(name string, address string, port uint) MIDINetworkHost

Creates a host with the specified name, adress, and port.

name: The host name.

address: The host’s IP address or hostname.

port: The host’s UDP port.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost/init(name:address:port:)

func NewMIDINetworkHostWithNameNetService

func NewMIDINetworkHostWithNameNetService(name string, netService foundation.NSNetService) MIDINetworkHost

Creates a host with the specified name and net service.

name: The host name.

netService: The net service.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost/init(name:netService:)

func NewMIDINetworkHostWithNameNetServiceNameNetServiceDomain

func NewMIDINetworkHostWithNameNetServiceNameNetServiceDomain(name string, netServiceName string, netServiceDomain string) MIDINetworkHost

Creates a host with the specified name, net service name, and domain.

name: The host name.

netServiceName: The net service name.

netServiceDomain: The net service domain.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost/init(name:netServiceName:netServiceDomain:)

func (MIDINetworkHost) Address

func (m MIDINetworkHost) Address() string

The host address.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost/address

func (MIDINetworkHost) Autorelease

func (m MIDINetworkHost) Autorelease() MIDINetworkHost

Autorelease adds the receiver to the current autorelease pool.

func (MIDINetworkHost) HasSameAddressAs

func (m MIDINetworkHost) HasSameAddressAs(other IMIDINetworkHost) bool

Compares this host instance with another to see if they share the same address value.

other: The other host instance to compare.

Return Value

A Boolean value that indicates whether the hosts have the same address value.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost/hasSameAddress(as:)

func (MIDINetworkHost) Init

Init initializes the instance.

func (MIDINetworkHost) NetServiceDomain

func (m MIDINetworkHost) NetServiceDomain() string

The net service domain.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost/netServiceDomain

func (MIDINetworkHost) NetServiceName

func (m MIDINetworkHost) NetServiceName() string

The net service name.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost/netServiceName

func (MIDINetworkHost) Port

func (m MIDINetworkHost) Port() uint

The host port.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkHost/port

type MIDINetworkHostClass

type MIDINetworkHostClass struct {
	// contains filtered or unexported fields
}

func GetMIDINetworkHostClass

func GetMIDINetworkHostClass() MIDINetworkHostClass

GetMIDINetworkHostClass returns the class object for MIDINetworkHost.

func (MIDINetworkHostClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDINetworkHostClass) Class

func (mc MIDINetworkHostClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDINetworkSession

type MIDINetworkSession struct {
	objectivec.Object
}

An object that represents a pairing of a source and destination.

Overview

A session can have any number of connections. The system broadcasts output to all connections, and merges input from multiple connections.

Configuring a Session

Inspecting a Sessions

Managing Connections

Managing Contacts

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession

func MIDINetworkSessionFromID

func MIDINetworkSessionFromID(id objc.ID) MIDINetworkSession

MIDINetworkSessionFromID constructs a MIDINetworkSession from an objc.ID.

An object that represents a pairing of a source and destination.

func NewMIDINetworkSession

func NewMIDINetworkSession() MIDINetworkSession

NewMIDINetworkSession creates a new MIDINetworkSession instance.

func (MIDINetworkSession) AddConnection

func (m MIDINetworkSession) AddConnection(connection IMIDINetworkConnection) bool

Adds a new connection to this session.

connection: The connection to add.

Return Value

true if the session successfully added the connection, otherwise false.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/addConnection(_:)

func (MIDINetworkSession) AddContact

func (m MIDINetworkSession) AddContact(contact IMIDINetworkHost) bool

Adds a host as a contact.

contact: The MIDI network host to add.

Return Value

true if the session successfully added the host, otherwise false.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/addContact(_:)

func (MIDINetworkSession) Autorelease

func (m MIDINetworkSession) Autorelease() MIDINetworkSession

Autorelease adds the receiver to the current autorelease pool.

func (MIDINetworkSession) ConnectionPolicy

func (m MIDINetworkSession) ConnectionPolicy() MIDINetworkConnectionPolicy

The policy that determines who can connect to this session.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/connectionPolicy

func (MIDINetworkSession) Connections

func (m MIDINetworkSession) Connections() foundation.INSSet

Returns the session’s set of MIDI network connections.

Return Value

The set of connections.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/connections()

func (MIDINetworkSession) Contacts

func (m MIDINetworkSession) Contacts() foundation.INSSet

Returns the array of network hosts.

Return Value

The set of MIDI network host objects.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/contacts()

func (MIDINetworkSession) DestinationEndpoint

func (m MIDINetworkSession) DestinationEndpoint() MIDIEndpointRef

Returns the session’s destination endpoint.

Return Value

The destination endpoint.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/destinationEndpoint()

func (MIDINetworkSession) Init

Init initializes the instance.

func (MIDINetworkSession) IsEnabled

func (m MIDINetworkSession) IsEnabled() bool

A Boolean value that determines whether the session is enabled.

Discussion

The default value is false. Disabled sessions don’t appear on the network and can’t initiate or receive connections.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/isEnabled

func (MIDINetworkSession) LocalName

func (m MIDINetworkSession) LocalName() string

The name of this session’s entity.

Discussion

The session’s endpoints inherit this value.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/localName

func (MIDINetworkSession) NetworkName

func (m MIDINetworkSession) NetworkName() string

The name with which this session advertises itself over Bonjour.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/networkName

func (MIDINetworkSession) NetworkPort

func (m MIDINetworkSession) NetworkPort() uint

The session’s UDP port.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/networkPort

func (MIDINetworkSession) RemoveConnection

func (m MIDINetworkSession) RemoveConnection(connection IMIDINetworkConnection) bool

Removes a connection from this session.

connection: The connection to remove.

Return Value

true if the session successfully removed the connection, otherwise false.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/removeConnection(_:)

func (MIDINetworkSession) RemoveContact

func (m MIDINetworkSession) RemoveContact(contact IMIDINetworkHost) bool

Removes a host as a contact.

contact: The host to remove.

Return Value

true if the session successfully removed the host, otherwise false.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/removeContact(_:)

func (MIDINetworkSession) SetConnectionPolicy

func (m MIDINetworkSession) SetConnectionPolicy(value MIDINetworkConnectionPolicy)

func (MIDINetworkSession) SetEnabled

func (m MIDINetworkSession) SetEnabled(value bool)

func (MIDINetworkSession) SourceEndpoint

func (m MIDINetworkSession) SourceEndpoint() MIDIEndpointRef

Returns the session’s source endpoint.

Return Value

The source endpoint.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/sourceEndpoint()

type MIDINetworkSessionClass

type MIDINetworkSessionClass struct {
	// contains filtered or unexported fields
}

func GetMIDINetworkSessionClass

func GetMIDINetworkSessionClass() MIDINetworkSessionClass

GetMIDINetworkSessionClass returns the class object for MIDINetworkSession.

func (MIDINetworkSessionClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDINetworkSessionClass) Class

func (mc MIDINetworkSessionClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

func (MIDINetworkSessionClass) DefaultSession

func (_MIDINetworkSessionClass MIDINetworkSessionClass) DefaultSession() MIDINetworkSession

Returns the default singleton session.

Return Value

The default session.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINetworkSession/default()

type MIDINotification

type MIDINotification struct {
	MessageID   MIDINotificationMessageID // An identifier that describes the type of state change.
	MessageSize uint32                    // The size of the message including its ID.

}

MIDINotification - A message that describes a system state change.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDINotification

type MIDINotificationMessageID

type MIDINotificationMessageID int32

See: https://developer.apple.com/documentation/CoreMIDI/MIDINotificationMessageID

const (
	// KMIDIMsgIOError: A driver I/O error occurred.
	KMIDIMsgIOError MIDINotificationMessageID = 7
	// KMIDIMsgObjectAdded: The system added a device, entity, or endpoint.
	KMIDIMsgObjectAdded MIDINotificationMessageID = 2
	// KMIDIMsgObjectRemoved: The system removed a device, entity, or endpoint.
	KMIDIMsgObjectRemoved MIDINotificationMessageID = 3
	// KMIDIMsgPropertyChanged: An object’s property value changed.
	KMIDIMsgPropertyChanged MIDINotificationMessageID = 4
	// KMIDIMsgSerialPortOwnerChanged: The system changed a serial port owner.
	KMIDIMsgSerialPortOwnerChanged MIDINotificationMessageID = 6
	// KMIDIMsgSetupChanged: Some aspect of the current MIDI setup changed.
	KMIDIMsgSetupChanged MIDINotificationMessageID = 1
	// KMIDIMsgThruConnectionsChanged: The system created or disposed of a persistent MIDI Thru connection.
	KMIDIMsgThruConnectionsChanged MIDINotificationMessageID = 5
)

func (MIDINotificationMessageID) String

func (e MIDINotificationMessageID) String() string

type MIDINotifyBlock

type MIDINotifyBlock = func(message *MIDINotification)

MIDINotifyBlock is a callback block for notifying clients of state changes.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINotifyBlock

type MIDINotifyProc

type MIDINotifyProc = func(message uintptr, refCon unsafe.Pointer)

MIDINotifyProc is a callback function for notifying clients of state changes.

See: https://developer.apple.com/documentation/CoreMIDI/MIDINotifyProc

type MIDIObjectAddRemoveNotification

type MIDIObjectAddRemoveNotification struct {
	MessageID   MIDINotificationMessageID // The message type.
	MessageSize uint32                    // The message size.
	Parent      MIDIObjectRef             // The parent object of the added or removed child.
	ParentType  MIDIObjectType            // The parent object type.
	Child       MIDIObjectRef             // The added or removed child object.
	ChildType   MIDIObjectType            // The child object type.

}

MIDIObjectAddRemoveNotification - A message that describes the addition or removal of an object.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectAddRemoveNotification

type MIDIObjectPropertyChangeNotification

type MIDIObjectPropertyChangeNotification struct {
	MessageID    MIDINotificationMessageID  // The message type.
	MessageSize  uint32                     // The message size.
	Object       MIDIObjectRef              // The object whose property changed.
	ObjectType   MIDIObjectType             // The object type.
	PropertyName corefoundation.CFStringRef // The name of the modified property.

}

MIDIObjectPropertyChangeNotification - A message that describes the change to an object property.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectPropertyChangeNotification

type MIDIObjectRef

type MIDIObjectRef = uint32

MIDIObjectRef is the common base class for many of the framework’s objects.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectRef

type MIDIObjectType

type MIDIObjectType int32

See: https://developer.apple.com/documentation/CoreMIDI/MIDIObjectType

const (
	// KMIDIObjectType_Destination: A MIDI destination.
	KMIDIObjectType_Destination MIDIObjectType = 3
	// KMIDIObjectType_Device: A MIDI device.
	KMIDIObjectType_Device MIDIObjectType = 0
	// KMIDIObjectType_Entity: A MIDI entity.
	KMIDIObjectType_Entity MIDIObjectType = 1
	// KMIDIObjectType_ExternalDestination: An external destination.
	KMIDIObjectType_ExternalDestination MIDIObjectType = 19
	// KMIDIObjectType_ExternalDevice: An external device.
	KMIDIObjectType_ExternalDevice MIDIObjectType = 0x10
	// KMIDIObjectType_ExternalEntity: An external entity.
	KMIDIObjectType_ExternalEntity MIDIObjectType = 17
	// KMIDIObjectType_ExternalSource: An external source.
	KMIDIObjectType_ExternalSource MIDIObjectType = 18
	// KMIDIObjectType_Other: A MIDI object with an undefined type.
	KMIDIObjectType_Other MIDIObjectType = -1
	// KMIDIObjectType_Source: A MIDI source.
	KMIDIObjectType_Source MIDIObjectType = 2
)

func (MIDIObjectType) String

func (e MIDIObjectType) String() string

type MIDIPacket

type MIDIPacket struct {
	// contains filtered or unexported fields
}

MIDIPacket - A collection of simultaneous MIDI events.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIPacket

func (*MIDIPacket) Data

func (s *MIDIPacket) Data() [256]uint8

Data returns the Data field from the record's packed storage.

func (*MIDIPacket) Length

func (s *MIDIPacket) Length() uint16

Length returns the Length field from the record's packed storage.

func (*MIDIPacket) SetData

func (s *MIDIPacket) SetData(v [256]uint8)

SetData updates the Data field in the record's packed storage.

func (*MIDIPacket) SetLength

func (s *MIDIPacket) SetLength(v uint16)

SetLength updates the Length field in the record's packed storage.

func (*MIDIPacket) SetTimeStamp

func (s *MIDIPacket) SetTimeStamp(v MIDITimeStamp)

SetTimeStamp updates the TimeStamp field in the record's packed storage.

func (*MIDIPacket) TimeStamp

func (s *MIDIPacket) TimeStamp() MIDITimeStamp

TimeStamp returns the TimeStamp field from the record's packed storage.

type MIDIPacketList

type MIDIPacketList struct {
	NumPackets uint32        // The number of MIDI packets in the list.
	Packet     [1]MIDIPacket // An open-ended array of variable-length MIDI packets.

}

MIDIPacketList - A list of MIDI events the system sends to or receives from an endpoint.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIPacketList

type MIDIPerNoteManagementOptions

type MIDIPerNoteManagementOptions uint8

See: https://developer.apple.com/documentation/CoreMIDI/MIDIPerNoteManagementOptions

const (
	KMIDIPerNoteManagementDetach MIDIPerNoteManagementOptions = 0x2
	KMIDIPerNoteManagementReset  MIDIPerNoteManagementOptions = 0x1
)

func (MIDIPerNoteManagementOptions) String

type MIDIPortRef

type MIDIPortRef = uint32

MIDIPortRef is a MIDI connection that a client maintains.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIPortRef

type MIDIProgramChangeOptions

type MIDIProgramChangeOptions uint8

See: https://developer.apple.com/documentation/CoreMIDI/MIDIProgramChangeOptions

const (
	KMIDIProgramChangeBankValid MIDIProgramChangeOptions = 0x1
)

func (MIDIProgramChangeOptions) String

func (e MIDIProgramChangeOptions) String() string

type MIDIReceiveBlock

type MIDIReceiveBlock = func(evtlist *MIDIEventList, srcConnRefCon unsafe.Pointer)

MIDIReceiveBlock is a block receiving MIDI input that includes the incoming messages and a refCon to identify the source.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIReceiveBlock

type MIDISetupRef

type MIDISetupRef = uint32

MIDISetupRef is a type that represents the global state of the MIDI system, that contains lists of the devices and serial port owners.

See: https://developer.apple.com/documentation/CoreMIDI/MIDISetupRef

type MIDISysexSendRequest

type MIDISysexSendRequest struct {
	Destination      MIDIEndpointRef    // The endpoint to send the event to.
	Data             *uint8             // The request’s data.
	BytesToSend      uint32             // The number of bytes to send.
	Complete         bool               // A Boolean value that indicates whether the transmission is complete.
	Reserved         [3]uint8           // A field that’s reserved for future use.
	CompletionProc   MIDICompletionProc // A function that the system calls after it sends all bytes for the request, or after the client marks the request as complete.
	CompletionRefCon unsafe.Pointer     // Data to pass to the completion function.

}

MIDISysexSendRequest - A request to asynchronously send a single system-exclusive (SysEx) event to a destination.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDISysexSendRequest

type MIDISysexSendRequestUMP

type MIDISysexSendRequestUMP struct {
	Destination      MIDIEndpointRef       // The endpoint to send the event to.
	Words            *uint32               // A pointer to the event to send, which the system advances as it sends the data.
	WordsToSend      uint32                // A counter of the number of words to send.
	Complete         bool                  // A Boolean value that indicates whether the transmission is complete.
	CompletionProc   MIDICompletionProcUMP // A function that the system calls after it sends all data for the request, or after the client marks the request as complete.
	CompletionRefCon unsafe.Pointer        // Data to pass to the completion function.

}

MIDISysexSendRequestUMP - A request to asynchronously send a single universal MIDI packet (UMP) system-exclusive (SysEx) event to a destination.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDISysexSendRequestUMP

type MIDIThruConnectionEndpoint

type MIDIThruConnectionEndpoint struct {
	EndpointRef MIDIEndpointRef // The endpoint reference.
	UniqueID    MIDIUniqueID    // The connection’s unique identifier.

}

MIDIThruConnectionEndpoint - A source or destination in a MIDI thru connection.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionEndpoint

type MIDIThruConnectionParams

type MIDIThruConnectionParams struct {
	Version              uint32                        // The version number.
	NumSources           uint32                        // The number of valid sources.
	Sources              [8]MIDIThruConnectionEndpoint // All MIDI sources for this connection.
	NumDestinations      uint32                        // The number of valid destinations.
	Destinations         [8]MIDIThruConnectionEndpoint // All MIDI destinations for this connection.
	ChannelMap           [16]uint8                     // A mapping of MIDI channels.
	LowVelocity          uint8                         // The velocity value below which the system filters out notes.
	HighVelocity         uint8                         // The velocity value above which the system filters out notes.
	LowNote              uint8                         // The note value below which the system filters out notes.
	HighNote             uint8                         // The note value above which the system filters out notes.
	NoteNumber           MIDITransform                 // The transformation of MIDI note numbers.
	Velocity             MIDITransform                 // A note velocity transformation.
	KeyPressure          MIDITransform                 // The transformation of polyphonic key pressure events.
	ChannelPressure      MIDITransform                 // The transformation of MIDI monophonic channel pressure events.
	ProgramChange        MIDITransform                 // A transformation of a MIDI program change event.
	PitchBend            MIDITransform                 // The transformation of a MIDI pitch bend event.
	FilterOutSysEx       uint8                         // A value that indicates wheter to filter out system-exclusive messages.
	FilterOutMTC         uint8                         // A value that indicates whether to filter out MIDI Time Code messages.
	FilterOutBeatClock   uint8                         // A value that indicates whether to filter out MIDI clock, play, stop, and resume messages.
	FilterOutTuneRequest uint8                         // A value that specifies whether to filter out MIDI tune request messages.
	Reserved2            [3]uint8                      // A reserved value that must be 0.
	FilterOutAllControls uint8                         // A value that indicates whether to filter out MIDI continuous control messages.
	NumControlTransforms uint16                        // The number of control transformations in the variable-length portion of the struct.
	NumMaps              uint16                        // The number of MIDI value maps in the variable-length portion of the struct.
	Reserved3            [4]uint16                     // A reserved value that must be 0.

}

MIDIThruConnectionParams - A set of MIDI routings and transformations.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionParams

type MIDIThruConnectionRef

type MIDIThruConnectionRef = uint32

MIDIThruConnectionRef is an opaque reference to a play-through connection.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIThruConnectionRef

type MIDITimeStamp

type MIDITimeStamp = uint64

MIDITimeStamp is the time on the host clock when the event occurred.

See: https://developer.apple.com/documentation/CoreMIDI/MIDITimeStamp

type MIDITransform

type MIDITransform struct {
	Transform MIDITransformType // The type of transformation to apply to the event values.
	Param     int16             // An argument to the transformation method (see description of MIDITransformType).

}

MIDITransform - The transformation of a single type of MIDI event.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDITransform

type MIDITransformControlType

type MIDITransformControlType uint8

See: https://developer.apple.com/documentation/CoreMIDI/MIDITransformControlType

const (
	// KMIDIControlType_14Bit: A 14-bit control type.
	KMIDIControlType_14Bit MIDITransformControlType = 1
	// KMIDIControlType_14BitNRPN: A 14-bit Nonregistered Parameter Number (RPN).
	KMIDIControlType_14BitNRPN MIDITransformControlType = 5
	// KMIDIControlType_14BitRPN: A 14-bit Registered Parameter Number (RPN).
	KMIDIControlType_14BitRPN MIDITransformControlType = 3
	// KMIDIControlType_7Bit: A 7-bit control type.
	KMIDIControlType_7Bit MIDITransformControlType = 0
	// KMIDIControlType_7BitNRPN: A 7-bit Nonregistered Parameter Number (RPN).
	KMIDIControlType_7BitNRPN MIDITransformControlType = 4
	// KMIDIControlType_7BitRPN: A 7-bit Registered Parameter Number (RPN).
	KMIDIControlType_7BitRPN MIDITransformControlType = 2
)

func (MIDITransformControlType) String

func (e MIDITransformControlType) String() string

type MIDITransformType

type MIDITransformType uint16

See: https://developer.apple.com/documentation/CoreMIDI/MIDITransformType

const (
	// KMIDITransform_Add: A transform that adds a parameter value.
	KMIDITransform_Add MIDITransformType = 8
	// KMIDITransform_FilterOut: A transformation that filters out an event type.
	KMIDITransform_FilterOut MIDITransformType = 1
	// KMIDITransform_MapControl: A transformation that changes a specified control number to a supplied parameter value.
	KMIDITransform_MapControl MIDITransformType = 2
	// KMIDITransform_MapValue: A transform that maps one value to another.
	KMIDITransform_MapValue MIDITransformType = 12
	// KMIDITransform_MaxValue: A transform that sets the maximum value to the specified parameter value.
	KMIDITransform_MaxValue MIDITransformType = 11
	// KMIDITransform_MinValue: A transform that sets the minimum value to the specified parameter value.
	KMIDITransform_MinValue MIDITransformType = 10
	// KMIDITransform_None: No transformation.
	KMIDITransform_None MIDITransformType = 0
	// KMIDITransform_Scale: A transform that multiplies by the specified parameter value.
	KMIDITransform_Scale MIDITransformType = 9
)

func (MIDITransformType) String

func (e MIDITransformType) String() string

type MIDIUInteger28

type MIDIUInteger28 = uint32

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUInteger28

MIDIUInteger28 values.

type MIDIUMPCIProfile

type MIDIUMPCIProfile struct {
	objectivec.Object
}

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPCIProfile

func MIDIUMPCIProfileFromID

func MIDIUMPCIProfileFromID(id objc.ID) MIDIUMPCIProfile

MIDIUMPCIProfileFromID constructs a MIDIUMPCIProfile from an objc.ID.

func NewMIDIUMPCIProfile

func NewMIDIUMPCIProfile() MIDIUMPCIProfile

NewMIDIUMPCIProfile creates a new MIDIUMPCIProfile instance.

func (MIDIUMPCIProfile) Autorelease

func (m MIDIUMPCIProfile) Autorelease() MIDIUMPCIProfile

Autorelease adds the receiver to the current autorelease pool.

func (MIDIUMPCIProfile) Init

Init initializes the instance.

type MIDIUMPCIProfileClass

type MIDIUMPCIProfileClass struct {
	// contains filtered or unexported fields
}

func GetMIDIUMPCIProfileClass

func GetMIDIUMPCIProfileClass() MIDIUMPCIProfileClass

GetMIDIUMPCIProfileClass returns the class object for MIDIUMPCIProfile.

func (MIDIUMPCIProfileClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDIUMPCIProfileClass) Class

func (mc MIDIUMPCIProfileClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDIUMPEndpoint

type MIDIUMPEndpoint struct {
	objectivec.Object
}

Instance Properties

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPEndpoint

func MIDIUMPEndpointFromID

func MIDIUMPEndpointFromID(id objc.ID) MIDIUMPEndpoint

MIDIUMPEndpointFromID constructs a MIDIUMPEndpoint from an objc.ID.

func NewMIDIUMPEndpoint

func NewMIDIUMPEndpoint() MIDIUMPEndpoint

NewMIDIUMPEndpoint creates a new MIDIUMPEndpoint instance.

func (MIDIUMPEndpoint) Autorelease

func (m MIDIUMPEndpoint) Autorelease() MIDIUMPEndpoint

Autorelease adds the receiver to the current autorelease pool.

func (MIDIUMPEndpoint) Init

Init initializes the instance.

func (MIDIUMPEndpoint) SetFunctionBlocks

func (m MIDIUMPEndpoint) SetFunctionBlocks(value []MIDIUMPFunctionBlock)

type MIDIUMPEndpointClass

type MIDIUMPEndpointClass struct {
	// contains filtered or unexported fields
}

func GetMIDIUMPEndpointClass

func GetMIDIUMPEndpointClass() MIDIUMPEndpointClass

GetMIDIUMPEndpointClass returns the class object for MIDIUMPEndpoint.

func (MIDIUMPEndpointClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDIUMPEndpointClass) Class

func (mc MIDIUMPEndpointClass) Class() objc.Class

Class returns the underlying Objective-C class pointer.

type MIDIUMPEndpointManager

type MIDIUMPEndpointManager struct {
	objectivec.Object
}

Instance Properties

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPEndpointManager

func MIDIUMPEndpointManagerFromID

func MIDIUMPEndpointManagerFromID(id objc.ID) MIDIUMPEndpointManager

MIDIUMPEndpointManagerFromID constructs a MIDIUMPEndpointManager from an objc.ID.

func NewMIDIUMPEndpointManager

func NewMIDIUMPEndpointManager() MIDIUMPEndpointManager

NewMIDIUMPEndpointManager creates a new MIDIUMPEndpointManager instance.

func (MIDIUMPEndpointManager) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (MIDIUMPEndpointManager) Init

Init initializes the instance.

type MIDIUMPEndpointManagerClass

type MIDIUMPEndpointManagerClass struct {
	// contains filtered or unexported fields
}

func GetMIDIUMPEndpointManagerClass

func GetMIDIUMPEndpointManagerClass() MIDIUMPEndpointManagerClass

GetMIDIUMPEndpointManagerClass returns the class object for MIDIUMPEndpointManager.

func (MIDIUMPEndpointManagerClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDIUMPEndpointManagerClass) Class

Class returns the underlying Objective-C class pointer.

func (MIDIUMPEndpointManagerClass) SharedInstance

func (_MIDIUMPEndpointManagerClass MIDIUMPEndpointManagerClass) SharedInstance() MIDIUMPEndpointManager

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPEndpointManager/shared

type MIDIUMPFunctionBlock

type MIDIUMPFunctionBlock struct {
	objectivec.Object
}

Instance Properties

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPFunctionBlock

func MIDIUMPFunctionBlockFromID

func MIDIUMPFunctionBlockFromID(id objc.ID) MIDIUMPFunctionBlock

MIDIUMPFunctionBlockFromID constructs a MIDIUMPFunctionBlock from an objc.ID.

func NewMIDIUMPFunctionBlock

func NewMIDIUMPFunctionBlock() MIDIUMPFunctionBlock

NewMIDIUMPFunctionBlock creates a new MIDIUMPFunctionBlock instance.

func (MIDIUMPFunctionBlock) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (MIDIUMPFunctionBlock) Init

Init initializes the instance.

type MIDIUMPFunctionBlockClass

type MIDIUMPFunctionBlockClass struct {
	// contains filtered or unexported fields
}

func GetMIDIUMPFunctionBlockClass

func GetMIDIUMPFunctionBlockClass() MIDIUMPFunctionBlockClass

GetMIDIUMPFunctionBlockClass returns the class object for MIDIUMPFunctionBlock.

func (MIDIUMPFunctionBlockClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDIUMPFunctionBlockClass) Class

Class returns the underlying Objective-C class pointer.

type MIDIUMPMutableEndpoint

type MIDIUMPMutableEndpoint struct {
	MIDIUMPEndpoint
}

Initializers

Instance Properties

Instance Methods

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPMutableEndpoint

func MIDIUMPMutableEndpointFromID

func MIDIUMPMutableEndpointFromID(id objc.ID) MIDIUMPMutableEndpoint

MIDIUMPMutableEndpointFromID constructs a MIDIUMPMutableEndpoint from an objc.ID.

func NewMIDIUMPMutableEndpoint

func NewMIDIUMPMutableEndpoint() MIDIUMPMutableEndpoint

NewMIDIUMPMutableEndpoint creates a new MIDIUMPMutableEndpoint instance.

func (MIDIUMPMutableEndpoint) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (MIDIUMPMutableEndpoint) Init

Init initializes the instance.

func (MIDIUMPMutableEndpoint) SetMutableFunctionBlocks

func (m MIDIUMPMutableEndpoint) SetMutableFunctionBlocks(value []MIDIUMPMutableFunctionBlock)

type MIDIUMPMutableEndpointClass

type MIDIUMPMutableEndpointClass struct {
	// contains filtered or unexported fields
}

func GetMIDIUMPMutableEndpointClass

func GetMIDIUMPMutableEndpointClass() MIDIUMPMutableEndpointClass

GetMIDIUMPMutableEndpointClass returns the class object for MIDIUMPMutableEndpoint.

func (MIDIUMPMutableEndpointClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDIUMPMutableEndpointClass) Class

Class returns the underlying Objective-C class pointer.

type MIDIUMPMutableFunctionBlock

type MIDIUMPMutableFunctionBlock struct {
	MIDIUMPFunctionBlock
}

Initializers

Instance Methods

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPMutableFunctionBlock

func MIDIUMPMutableFunctionBlockFromID

func MIDIUMPMutableFunctionBlockFromID(id objc.ID) MIDIUMPMutableFunctionBlock

MIDIUMPMutableFunctionBlockFromID constructs a MIDIUMPMutableFunctionBlock from an objc.ID.

func NewMIDIUMPMutableFunctionBlock

func NewMIDIUMPMutableFunctionBlock() MIDIUMPMutableFunctionBlock

NewMIDIUMPMutableFunctionBlock creates a new MIDIUMPMutableFunctionBlock instance.

func (MIDIUMPMutableFunctionBlock) Autorelease

Autorelease adds the receiver to the current autorelease pool.

func (MIDIUMPMutableFunctionBlock) Init

Init initializes the instance.

type MIDIUMPMutableFunctionBlockClass

type MIDIUMPMutableFunctionBlockClass struct {
	// contains filtered or unexported fields
}

func GetMIDIUMPMutableFunctionBlockClass

func GetMIDIUMPMutableFunctionBlockClass() MIDIUMPMutableFunctionBlockClass

GetMIDIUMPMutableFunctionBlockClass returns the class object for MIDIUMPMutableFunctionBlock.

func (MIDIUMPMutableFunctionBlockClass) Alloc

Alloc allocates memory for a new instance of the class.

func (MIDIUMPMutableFunctionBlockClass) Class

Class returns the underlying Objective-C class pointer.

type MIDIUMPProtocolOptions

type MIDIUMPProtocolOptions uint8

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUMPProtocolOptions

const (
	KMIDIUMPProtocolOptionsMIDI1 MIDIUMPProtocolOptions = 1
	KMIDIUMPProtocolOptionsMIDI2 MIDIUMPProtocolOptions = 2
)

func (MIDIUMPProtocolOptions) String

func (e MIDIUMPProtocolOptions) String() string

type MIDIUniqueID

type MIDIUniqueID = int32

MIDIUniqueID is a MIDI object’s unique identifier.

See: https://developer.apple.com/documentation/CoreMIDI/MIDIUniqueID

type MIDIUniversalMessage

type MIDIUniversalMessage struct {
	Type                     MIDIMessageType
	Group                    uint8
	Reserved                 [3]uint8
	Status                   MIDIUtilityStatus
	JitterReductionClock     uint16
	JitterReductionTimestamp uint16
	ChannelVoice1            unsafe.Pointer
	ChannelVoice2            unsafe.Pointer
	Data128                  unsafe.Pointer
	SysEx                    unsafe.Pointer
	System                   unsafe.Pointer
	Unknown                  unsafe.Pointer
	Utility                  unsafe.Pointer
}

MIDIUniversalMessage

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIUniversalMessage

type MIDIValueMap

type MIDIValueMap struct {
	Value [128]uint8 // The array of unsigned 8-bit integers.

}

MIDIValueMap - A custom lookup table to transform MIDI 7-bit values, as contained in note numbers, velocities, control values, and so on.

[Full Topic] [Full Topic]: https://developer.apple.com/documentation/CoreMIDI/MIDIValueMap

type VoidHandler

type VoidHandler = func()

VoidHandler handles A block the system calls when the session’s data is ready.

Used by:

  • [MIDICISession.InitWithDiscoveredNodeDataReadyHandlerDisconnectHandler]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL