Fix mute of MIDI tracks with channel forcing.
authorDavid Robillard <d@drobilla.net>
Sun, 29 Mar 2015 03:24:41 +0000 (23:24 -0400)
committerDavid Robillard <d@drobilla.net>
Sun, 29 Mar 2015 04:51:56 +0000 (00:51 -0400)
commitc9023ae73d6d70fead3e827811b384e2b171e4d6
tree3a6cb5a0a7d436bed457f961afb272b82f1626be
parent050c9c3f7d695ea8736d050f3eac5c4f0a3158ca
Fix mute of MIDI tracks with channel forcing.

This moves MIDI channel filtering into a reusable class and moves filtering to
the source, rather than modifying the buffer afterwards.  This is necessary so
that the playlist trackers reflect the emitted notes (and thus are able to stop
them in situations like mute).

As a perk, this is also faster because events are just dropped on read, rather
than pushed into a buffer then later removed (which is very slow).

Really hammering on mute or solo still seems to produce stuck notes
occasionally (perhaps related to multiple-on warnings).  I am not yet sure why,
but occasional beats always.
19 files changed:
gtk2_ardour/midi_channel_selector.cc
gtk2_ardour/midi_region_view.cc
gtk2_ardour/midi_time_axis.cc
libs/ardour/ardour/midi_channel_filter.h [new file with mode: 0644]
libs/ardour/ardour/midi_playlist.h
libs/ardour/ardour/midi_playlist_source.h
libs/ardour/ardour/midi_region.h
libs/ardour/ardour/midi_source.h
libs/ardour/ardour/midi_track.h
libs/ardour/ardour/smf_source.h
libs/ardour/midi_channel_filter.cc [new file with mode: 0644]
libs/ardour/midi_diskstream.cc
libs/ardour/midi_playlist.cc
libs/ardour/midi_playlist_source.cc
libs/ardour/midi_region.cc
libs/ardour/midi_source.cc
libs/ardour/midi_track.cc
libs/ardour/smf_source.cc
libs/ardour/wscript