Main Content

getMIDIConnections

Get MIDI connections of audio object

Description

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

The connectionInfo structure contains a substructure for each tunable property of audioObject that 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).

example

Examples

collapse all

Create an object of the audio plugin example audiopluginexample.Echo.

echoEffect = audiopluginexample.Echo;

Use configureMIDI to synchronize echoEffect properties 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);

Use getMIDIConnections to 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 the Delay1 MIDI 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 the audioPlugin class 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 using configureMIDI are returned. The connectionInfo structure 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).

Version History

Introduced in R2016a