Interactively identify MIDI control

    Note:   The midiid function will be removed from DSP System Toolbox™ in a future release. Existing instances of the function continue to run. For new code, use the midiid function from Audio System Toolbox™ instead.




[ctl device] = midiid returns the control number and device name of the MIDI control moved by the user. Call the function at the MATLAB command prompt and then move the control you want to identify on the MIDI control surface. The function detects which control you move and returns the corresponding control number and device name that specify that control.


collapse all

Retrieve Control Number and Device Name

Call midiid.

[ctl,dev] = midiid;
Move the control you wish to identify; type ^C to abort.
Waiting for control message...
ctl =
dev =

Output Arguments

collapse all

ctl — Number associated with control being movedinteger values

ctl is an integer-valued double-precision number. Each control on the MIDI device has a specific integer assigned to it by the device manufacturer.

Example: 1003

Data Types: double

device — Name of devicecharacter string

device is a character string assigned by the device manufacturer or the host operating system.

Example: 'nanoKontrol'

Data Types: char

Introduced in R2013b

Was this topic helpful?