added MIDI setup code