Refactored MIDI playing. Works now.