Make input filtering while recording work in GUI, too
git-svn-id: svn://localhost/ardour2/branches/3.0@13244 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
f61f973f87
commit
6177205398
|
@ -81,6 +81,7 @@ public:
|
|||
sigc::signal<void, ARDOUR::ChannelMode, uint16_t> mode_changed;
|
||||
|
||||
void set_channel_mode(ARDOUR::ChannelMode mode, uint16_t mask);
|
||||
ARDOUR::ChannelMode get_channel_mode () const { return _channel_mode; }
|
||||
|
||||
/**
|
||||
* @return each bit in the returned word represents a midi channel, eg.
|
||||
|
|
|
@ -116,6 +116,13 @@ MidiRegionView::MidiRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &
|
|||
_note_group->raise_to_top();
|
||||
PublicEditor::DropDownKeys.connect (sigc::mem_fun (*this, &MidiRegionView::drop_down_keys));
|
||||
|
||||
|
||||
MidiTimeAxisView *time_axis = dynamic_cast<MidiTimeAxisView *>(&tv);
|
||||
if (time_axis) {
|
||||
_last_channel_mode = time_axis->channel_selector().get_channel_mode();
|
||||
_last_channel_selection = time_axis->channel_selector().get_selected_channels();
|
||||
}
|
||||
|
||||
Config->ParameterChanged.connect (*this, invalidator (*this), boost::bind (&MidiRegionView::parameter_changed, this, _1), gui_context());
|
||||
connect_to_diskstream ();
|
||||
|
||||
|
@ -153,6 +160,12 @@ MidiRegionView::MidiRegionView (ArdourCanvas::Group *parent, RouteTimeAxisView &
|
|||
_note_group->raise_to_top();
|
||||
PublicEditor::DropDownKeys.connect (sigc::mem_fun (*this, &MidiRegionView::drop_down_keys));
|
||||
|
||||
MidiTimeAxisView *time_axis = dynamic_cast<MidiTimeAxisView *>(&tv);
|
||||
if (time_axis) {
|
||||
_last_channel_mode = time_axis->channel_selector().get_channel_mode();
|
||||
_last_channel_selection = time_axis->channel_selector().get_selected_channels();
|
||||
}
|
||||
|
||||
connect_to_diskstream ();
|
||||
|
||||
SelectionCleared.connect (_selection_cleared_connection, invalidator (*this), boost::bind (&MidiRegionView::selection_cleared, this, _1), gui_context ());
|
||||
|
@ -3247,6 +3260,7 @@ MidiRegionView::midi_channel_mode_changed(ChannelMode mode, uint16_t mask)
|
|||
}
|
||||
|
||||
_last_channel_selection = mask;
|
||||
_last_channel_mode = mode;
|
||||
|
||||
_patch_changes.clear ();
|
||||
display_patch_changes ();
|
||||
|
@ -3701,6 +3715,14 @@ MidiRegionView::data_recorded (boost::weak_ptr<MidiSource> w)
|
|||
Evoral::MIDIEvent<MidiBuffer::TimeType> const ev (*i, false);
|
||||
assert (ev.buffer ());
|
||||
|
||||
if(ev.is_channel_event()) {
|
||||
if (_last_channel_mode == FilterChannels) {
|
||||
if(((uint16_t(1) << ev.channel()) & _last_channel_selection) == 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ev.time() is in session frames, so (ev.time() - converter.origin_b()) is
|
||||
frames from the start of the source, and so time_beats is in terms of the
|
||||
source.
|
||||
|
|
|
@ -379,7 +379,9 @@ private:
|
|||
void show_verbose_cursor (std::string const &, double, double) const;
|
||||
void show_verbose_cursor (boost::shared_ptr<NoteType>) const;
|
||||
|
||||
ARDOUR::ChannelMode _last_channel_mode;
|
||||
uint16_t _last_channel_selection;
|
||||
|
||||
uint8_t _current_range_min;
|
||||
uint8_t _current_range_max;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user