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 /gtk2_ardour/midi_channel_selector.cc | |
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 'gtk2_ardour/midi_channel_selector.cc')
-rw-r--r-- | gtk2_ardour/midi_channel_selector.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gtk2_ardour/midi_channel_selector.cc b/gtk2_ardour/midi_channel_selector.cc index 4884d72328..1895b5c52f 100644 --- a/gtk2_ardour/midi_channel_selector.cc +++ b/gtk2_ardour/midi_channel_selector.cc @@ -27,6 +27,7 @@ #include <gtkmm/table.h> #include "pbd/compose.h" +#include "pbd/ffs.h" #include "gtkmm2ext/gtk_ui.h" #include "gtkmm2ext/gui_thread.h" @@ -343,10 +344,10 @@ MidiChannelSelectorWindow::MidiChannelSelectorWindow (boost::shared_ptr<MidiTrac playback_mask_changed (); capture_mask_changed (); - track->PlaybackChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mask_changed, this), gui_context()); - track->PlaybackChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mode_changed, this), gui_context()); - track->CaptureChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mask_changed, this), gui_context()); - track->CaptureChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mode_changed, this), gui_context()); + track->playback_filter().ChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mask_changed, this), gui_context()); + track->playback_filter().ChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::playback_mode_changed, this), gui_context()); + track->capture_filter().ChannelMaskChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mask_changed, this), gui_context()); + track->capture_filter().ChannelModeChanged.connect (*this, MISSING_INVALIDATOR, boost::bind (&MidiChannelSelectorWindow::capture_mode_changed, this), gui_context()); } MidiChannelSelectorWindow::~MidiChannelSelectorWindow() |