Main Content

disconnectMIDI

Disconnect MIDI controls from audio object

Description

disconnectMIDI(audioObject) disconnects MIDI controls from your audio object, audioObject. Only those MIDI connections established using configureMIDI are disconnected.

example

Examples

collapse all

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

echoPlugin = audiopluginexample.Echo;

Get the MIDI connections of echoPlugin and verify that it has no MIDI connections.

myMIDIConnections = getMIDIConnections(echoPlugin);
isempty(myMIDIConnections)
ans =

     1

Add MIDI connections using configureMIDI.

configureMIDI(echoPlugin,'Delay1');

Get the MIDI connections of echoPlugin using getMIDIConnections. The MIDI connections you configured are saved as a structure. View details of the MIDI connections using dot notation.

myMIDIConnections = getMIDIConnections(echoPlugin);
myMIDIConnections.Delay1
ans = 

            Law: 'lin'
            Min: 0
            Max: 1
    MIDIControl: 'any control on 'BCF2000''

Use disconnectMIDI to remove MIDI connections between your echoPlugin object and your MIDI device.

disconnectMIDI(echoPlugin);

Get MIDI connections of echoPlugin and verify that you have successfully disconnected MIDI controls from your plugin.

myMIDIConnections = getMIDIConnections(echoPlugin);
isempty(myMIDIConnections)
ans =

     1

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.

Version History

Introduced in R2016a