Basic setup of a MIDI device
Open the device
Close the device
Start receiving MIDI messages.
Stop receiving MIDI messages.
Waits until the input device starts receiving messages.
Waits until the input device does not receive any more messages.