Sort outgoing midi events so that chords (and other things in the future) can play.  Use heapsort(), and first compare times, then put note offs before note ons so that notes stop playing before they are hit again.
Sort outgoing midi events so that chords (and other things in the future)
can play.  Use heapsort(), and first compare times, then put note offs
before note ons so that notes stop playing before they are hit again.

turnipsi/mdl,turnipsi/mdl