%% Connect Input and Output to Different MIDI Devices
% Query your system for available MIDI devices.

mididevinfo

% Create a MIDI device object that receives data from one device and sends data to another device. In this example, the MIDI device object receives MIDI messages from the 'USB MIDI Interface ' device and sends data to the 'Microsoft GS Wavetable Synth' virtual output device. To avoid ambiguity, the MIDI devices are specified by the device IDs.

device = mididevice('Input',1,'Output',2)

% Copyright 2012 The MathWorks, Inc.