This breaks MIDI files that have events ordered On,On,Off,Off, and only fixes the "malformed" On,On,Off. Correct fix requires collecting all events occuring yat one time, sorting into Off,On and then merging. This reverts commit 5c3e5f9afb.
5c3e5f9afb
6801c2cac2