Use midiid
to identify the name of
your MIDI device and a specified control. Move the MIDI control you
want to identify.
Move the control you wish to identify; type ^C to abort.
Waiting for control message... done
Create a MIDI controls object. The value associated with
your MIDI controls object cannot be determined until you move the
MIDI control. Specify an initial value associated with your MIDI control.
The midiread
function returns the initial value
until the MIDI control is moved.
Create a dsp.AudioFileReader
System object™ with
default settings. Create an audioDeviceWriter
System object and
specify the sample rate.
In an audio stream loop, read an audio signal frame from
the file, apply gain specified by the control on your MIDI device,
and then write the frame to your audio output device. By default,
the control value returned by midiread
is normalized.
Close the input file and release your output device.