More robust automatic note-off abilities.
Pressing pause, stop, and editing patterns while transport is running
causes playing notes to stop. Instead of using 'all notes off' controller
change messages, the sequencer keeps track of playing notes and does
a fast search to see which ones to cancel. This reduces midi bus traffic
considerably.
There is a potential race condition because both the audio thread (while
sequencer is playing) and the GUI (when changes are made) manipulate the
bit field used to track notes that are on. A possible error is when the
user presses a control or edits a pattern just as a note should be ending.
By the powers of multithreading, two note offs may be generated when there
should only be one. I am considering this rare and harmless enough at this
time to ignore it. Doing it correctly would require a better serialized,
lock-free command queue, and would solve a few other race conditions. Maybe
some other time.