Share via


CoreMidi Namespace

The CoreMidi namespace provides classes for interacting with the MIDI subsystem.

Classes

Name Description
IOErrorEventArgs

Provides data for the IOError event.

Midi

Global methods and constants for using CoreMidi.

Midi.Notifications

Notifications posted by the Midi class.

Midi2DeviceInfo
MidiBluetoothDriver
MidiCIDevice
MidiCIDevice.Notifications

Notifications posted by the MidiCIDevice class.

MidiCIDeviceInfo
MidiCIDeviceManager
MidiCIDeviceManagerDictionaryKey
MidiCIDiscoveredNode
MidiCIDiscoveryManager
MidiCIProfile
MidiCIProfile.Notifications

Notifications posted by the MidiCIProfile class.

MidiCIProfileResponderDelegate

This is a class that implements the interface IMidiCIProfileResponderDelegate (for the protocol MIDICIProfileResponderDelegate).

Subclass this class to easily create a type that implements the protocol.

An alternative is to create a subclass of NSObject and then implemented the interface IMidiCIProfileResponderDelegate.

MidiCIProfileResponderDelegate_Extensions

Extension methods to the IMidiCIProfileResponderDelegate interface to support all the methods from the MIDICIProfileResponderDelegate protocol.

MidiCIProfileState
MidiCIResponder
MidiCISession
MidiClient

Main entry point to use MIDI in MacOS X and iOS.

MidiDevice

Represents a MIDI device (typically they represent a hardware device, but virtual devices also exist). Devices can contain one or more entities.

MidiDeviceList
MidiEndpoint

Endpoints represent an individual source or destination on the MIDI stream.

MidiEntity

A MidiObject that represents a sub-component of a MidiDevice.

MidiException

Exception raised by Midi methods.

MidiNetworkConnection

A connection to a MIDI network host, using a MidiNetworkSession.

MidiNetworkHost

A remote MIDI host.

MidiNetworkSession

A singleton class that maintains the MidiNetworkConnections between various MIDI entities.

MidiObject

Base class for the MidiClient, MidiPort, MidiEntity, MidiDevice and MidiEndpoint classes.

MidiPacket

Encapsulates a series of MIDI events.

MidiPacketsEventArgs

Provides data for the MessageReceived and MessageReceived events.

MidiPort

Input and Output ports.

MidiThruConnection

Manages MIDI play-through connections.

MidiThruConnectionParams

MIDI transformations and routings.

MidiUmpCIProfile
MidiUmpEndpoint
MidiUmpEndpoint.Notifications

Notifications posted by the MidiUmpEndpoint class.

MidiUmpEndpointManager
MidiUmpEndpointManagerDictionaryKey
MidiUmpFunctionBlock
MidiUmpFunctionBlock.Notifications

Notifications posted by the MidiUmpFunctionBlock class.

MidiUmpMutableEndpoint
MidiUmpMutableFunctionBlock
ObjectAddedOrRemovedEventArgs

Provides data for the ObjectAdded and ObjectRemoved events.

ObjectPropertyChangedEventArgs

Provides data for the PropertyChanged event.

Structs

Name Description
Midi2DeviceManufacturer
Midi2DeviceRevisionLevel
MidiCIDeviceIdentification
MidiCIProfileId
MidiCIProfileIdManufacturerSpecific
MidiCIProfileIdStandard
MidiControlTransform

Represents a transformation of a MIDI control.

MidiThruConnectionEndpoint

Source or Destination of a MidiThruConnection.

MidiTransform

Object that defines how a MIDI event is transformed.

MidiValueMap

MIDI Value map.

Interfaces

Name Description
IMidiCIProfileResponderDelegate

This interface represents the Objective-C protocol MIDICIProfileResponderDelegate.

Enums

Name Description
MidiCICategoryOptions
MidiCIDeviceType
MidiCIManagementMessageType
MidiCIProcessInquiryMessageType
MidiCIProfileMessageType
MidiCIProfileType
MidiCIPropertyExchangeMessageType
MidiCIPropertyExchangeRequestID
MidiCVStatus
MidiError

Errors raised by the CoreMIDI stack.

MidiMessageType
MidiNetworkConnectionPolicy

An enumeration whose values specify which hosts are eligible to connect to a MIDI network session.

MidiNoteAttribute
MidiPerNoteManagementOptions
MidiProgramChangeOptions
MidiProtocolId
MidiSysExStatus
MidiSystemStatus
MidiTransformControlType

MIDI Control Transformation Type.

MidiTransformType

MIDI transform types.

MidiUmpCIObjectBackingType
MidiUmpFunctionBlockDirection
MidiUmpFunctionBlockMidi1Info
MidiUmpFunctionBlockUIHint
MidiUmpProtocolOptions
MidiUtilityStatus
UmpStreamMessageFormat
UmpStreamMessageStatus

Delegates

Name Description
MidiCIDiscoveryResponseDelegate
MidiCIProfileChangedHandler
MidiCIProfileSpecificDataHandler
MidiCISessionDisconnectHandler
MidiReceiveBlock

Remarks

CoreMIDI is an API that talks to the MIDI server on the device which in turn interacts with MIDI devices connected to your device.

When using CoreMIDI, you will run into various classes that deal with different parts of the MIDI stack, the following graphic illustrates the relationships:

The MIDI device itself is represented by the MidiDevice class. Devices can contain one or more entities (MidiEntity). For example a MIDI device could contain two independent MIDI tone generators. Each Entity contains a series of endpoints which are either sources or destinations. Both MIDI sources and MIDI destinations are encapsulated by the MidiEntity class.

To start with MIDI, you will need to create a MidiClient object. This object is the gateway between your application and the MIDI server process. You subscribe to the events that this object raises to track devices being added, removed and to changes in their properties and setup configuration.

You also use the MidiClient to create input ports and output ports. The input ports raise the MessageReceived event when new MIDI data is available and you can use the Packets property in the arguments received to get the data out.

See the MidiClient class for an example of how to set things up.

To use networked MIDI connections, you need to enable the network session and set its connection policy, like this:

var session = MidiNetworkSession.DefaultSession;
session.Enabled = true;
session.ConnectionPolicy = MidiNetworkConnectionPolicy.Anyone;

To connect to a remote MIDI network host you use the MidiNetworkHost, like this:

var host = MidiNetworkHost.Create ("My Session", "myhost.example.com", 5004);
var connection = MidiNetworkConnection.FromHost (host);