diff options
author | David Robillard <d@drobilla.net> | 2015-03-28 23:24:41 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-03-29 00:51:56 -0400 |
commit | c9023ae73d6d70fead3e827811b384e2b171e4d6 (patch) | |
tree | 3a6cb5a0a7d436bed457f961afb272b82f1626be /libs/ardour/ardour/midi_region.h | |
parent | 050c9c3f7d695ea8736d050f3eac5c4f0a3158ca (diff) |
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.
Diffstat (limited to 'libs/ardour/ardour/midi_region.h')
-rw-r--r-- | libs/ardour/ardour/midi_region.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h index f7e6c97ea0..87e89c695b 100644 --- a/libs/ardour/ardour/midi_region.h +++ b/libs/ardour/ardour/midi_region.h @@ -43,13 +43,14 @@ template<typename Time> class EventSink; namespace ARDOUR { -class Route; -class Playlist; -class Session; +class MidiChannelFilter; class MidiFilter; class MidiModel; class MidiSource; class MidiStateTracker; +class Playlist; +class Route; +class Session; template<typename T> class MidiRingBuffer; @@ -74,7 +75,8 @@ class LIBARDOUR_API MidiRegion : public Region framecnt_t dur, uint32_t chan_n = 0, NoteMode mode = Sustained, - MidiStateTracker* tracker = 0) const; + MidiStateTracker* tracker = 0, + MidiChannelFilter* filter = 0) const; framecnt_t master_read_at (MidiRingBuffer<framepos_t>& dst, framepos_t position, @@ -121,7 +123,8 @@ class LIBARDOUR_API MidiRegion : public Region framecnt_t dur, uint32_t chan_n = 0, NoteMode mode = Sustained, - MidiStateTracker* tracker = 0) const; + MidiStateTracker* tracker = 0, + MidiChannelFilter* filter = 0) const; void register_properties (); void post_set (const PBD::PropertyChange&); |