separated MIDI functions