Main Content

getMIDIConnections

Get MIDI connections of audio object

Description

example

connectionInfo= getMIDIConnections(audioObject)returns a structure,connectionInfo, containing information about the MIDI connections for your audio object,audioObject. Only those MIDI connections established usingconfigureMIDIare returned.

TheconnectionInfostructure contains a substructure for each tunable property ofaudioObjectthat has established MIDI connections. Each substructure contains the control number, the device name of the corresponding MIDI control, and the property mapping information (mapping rule, minimum value, and maximum value).

Examples

collapse all

Create an object of the audio plugin exampleaudiopluginexample.Echo.

echoEffect = audiopluginexample.Echo;

UseconfigureMIDIto synchronizeechoEffectproperties with specific MIDI controls on the default MIDI device.

configureMIDI(echoEffect,'Delay1',1001); configureMIDI(echoEffect,'Gain1',1002); configureMIDI(echoEffect,'Delay2',1003); configureMIDI(echoEffect,'Gain2',1004);

UsegetMIDIConnectionsto view the MIDI connections you established.

connectionInfo = getMIDIConnections(echoEffect)
connectionInfo = Delay1: [1x1 struct] Gain1: [1x1 struct] Delay2: [1x1 struct] Gain2: [1x1 struct]

View details of theDelay1MIDI connection using dot notation.

connectionInfo.Delay1
ans = Law: 'lin' Min: 0 Max: 1 MIDIControl: 'control 1001 on 'nanoKONTROL2''

Input Arguments

collapse all

Audio plugin or compatible System object™, specified as an object that inherits from theaudioPluginclass or an object of a compatible Audio Toolbox™ System object.

Output Arguments

collapse all

Information about MIDI connection between the specified audio plugin object and MIDI devices, returned as a structure. Only those MIDI connections established usingconfigureMIDIare returned. TheconnectionInfostructure contains a substructure for each established MIDI connection. Each substructure contains the control number, the device name of the corresponding MIDI control, and the property mapping information (mapping rule, minimum value, and maximum value).

H版istory

Introduced in R2016a