The real-time MIDI subsystem (RTMIDI) provides support for handling real-time MIDI operations for applications. The following table describes the RTMIDI functions that are currently supported.
All of the RTMIDI functions have MIDIERR_INTERNAL_SYSTEM and MIDIERR_INVALID_PARAMETER as possible returns (with the exception of TimerGetPointer and TimerSleep, which have TIMERERR_INTERNAL_SYSTEM and TIMERERR_INVALID_PARAMETER as possible returns). If MIDIERR_INTERNAL_SYSTEM or TIMERERR_INTERNAL_SYSTEM is returned, the application should shut down immediately and not attempt any further calls to RTMIDI.
┌──────────────────────────────┬────────────────────────────────────────┐ │Function │Description │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIAddLink │Creates a link from the source instance │ │ │to a target instance. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDICreateInstance │Creates an instance. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIDeleteInstance │Deletes an instance. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIDisableInstance │Disables an instance from sending or │ │ │receiving messages. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIEnableInstance │Enables an instance for sending or │ │ │receiving messages. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIQueryClassList │Returns the names of all valid current │ │ │classes. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIQueryInstanceList │Returns a sequential list of relevant │ │ │instance data for all instances in the │ │ │chain. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIQueryInstanceName │Returns the name of an instance. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIQueryNumClasses │Returns the number of classes currently │ │ │registered. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIQueryNumInstances │Returns the number of instances. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIQueryVersion │Returns the current RTMIDI device driver│ │ │and DLL version numbers. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDIRemoveLink │Removes a link from the source instance │ │ │to a target instance. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDISendMessages │Sends a block of MIDI messages. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDISetup │Provides a generic setup for an │ │ │application. │ ├──────────────────────────────┼────────────────────────────────────────┤ │MIDITimer │Starts or stops the RTMIDI timer. │ ├──────────────────────────────┼────────────────────────────────────────┤ │TimerGetPointer │Obtains a pointer to the RTMIDI timer. │ ├──────────────────────────────┼────────────────────────────────────────┤ │TimerSleep │Sets the duration in milliseconds to │ │ │trigger an event originated by the │ │ │application. │ └──────────────────────────────┴────────────────────────────────────────┘