When receiving MIDI input, you can control when the input starts and stops. Use the following functions to start and stop input on a MIDI input device:
midiInStart
Starts input on a MIDI input device.
midiInStop
Stops input on a MIDI input device.
midiInReset
Stops input on a MIDI input device. Marks all pending data buffers as being done.