%% Connect Input and Output to Single MIDI Device
%
% Query your system for available MIDI devices.

mididevinfo

%  Create a MIDI device object to interface with your selected device. If you specify a single MIDI device object, and it is capable of both input and output, mididevice connects to both the input and output.

device = mididevice('USB MIDI Interface ')

% Copyright 2012 The MathWorks, Inc.