Remember MIDI-track note-range -- #7773
Previously only manual changes of the note-range using the scroomer. The NoteRangeChanged() was ignored for implicit changes (e.g. while recording, step-entry) and automatic-fit that didn't involve a drag event.
This commit is contained in:
parent
18958af3d8
commit
53c677e08f
@ -212,7 +212,7 @@ MidiStreamView::display_track (boost::shared_ptr<Track> tr)
|
|||||||
|
|
||||||
draw_note_lines();
|
draw_note_lines();
|
||||||
|
|
||||||
NoteRangeChanged();
|
NoteRangeChanged(); /* EMIT SIGNAL*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -424,7 +424,7 @@ MidiStreamView::apply_note_range(uint8_t lowest, uint8_t highest, bool to_region
|
|||||||
apply_note_range_to_regions ();
|
apply_note_range_to_regions ();
|
||||||
}
|
}
|
||||||
|
|
||||||
NoteRangeChanged();
|
NoteRangeChanged(); /* EMIT SIGNAL*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -158,6 +158,8 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||||||
|
|
||||||
subplugin_menu.set_name ("ArdourContextMenu");
|
subplugin_menu.set_name ("ArdourContextMenu");
|
||||||
|
|
||||||
|
_note_range_changed_connection.disconnect();
|
||||||
|
|
||||||
if (!gui_property ("note-range-min").empty ()) {
|
if (!gui_property ("note-range-min").empty ()) {
|
||||||
midi_view()->apply_note_range (atoi (gui_property ("note-range-min").c_str()),
|
midi_view()->apply_note_range (atoi (gui_property ("note-range-min").c_str()),
|
||||||
atoi (gui_property ("note-range-max").c_str()),
|
atoi (gui_property ("note-range-max").c_str()),
|
||||||
@ -202,13 +204,6 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||||||
_piano_roll_header->ToggleNoteSelection.connect (
|
_piano_roll_header->ToggleNoteSelection.connect (
|
||||||
sigc::mem_fun (*this, &MidiTimeAxisView::toggle_note_selection));
|
sigc::mem_fun (*this, &MidiTimeAxisView::toggle_note_selection));
|
||||||
|
|
||||||
/* Update StreamView during scroomer drags.*/
|
|
||||||
|
|
||||||
_range_scroomer->DragStarting.connect (
|
|
||||||
sigc::mem_fun (*this, &MidiTimeAxisView::start_scroomer_update));
|
|
||||||
_range_scroomer->DragFinishing.connect (
|
|
||||||
sigc::mem_fun (*this, &MidiTimeAxisView::stop_scroomer_update));
|
|
||||||
|
|
||||||
/* Put the scroomer and the keyboard in a VBox with a padding
|
/* Put the scroomer and the keyboard in a VBox with a padding
|
||||||
label so that they can be reduced in height for stacked-view
|
label so that they can be reduced in height for stacked-view
|
||||||
tracks.
|
tracks.
|
||||||
@ -231,6 +226,13 @@ MidiTimeAxisView::set_route (boost::shared_ptr<Route> rt)
|
|||||||
time_axis_hbox.pack_end(*v, false, false, 0);
|
time_axis_hbox.pack_end(*v, false, false, 0);
|
||||||
midi_scroomer_size_group->add_widget (*v);
|
midi_scroomer_size_group->add_widget (*v);
|
||||||
|
|
||||||
|
/* callback from StreamView scroomer drags, as well as
|
||||||
|
* automatic changes of note-range (e.g. at rec-stop).
|
||||||
|
* This callback is used to save the note-range-min/max
|
||||||
|
* GUI Object property
|
||||||
|
*/
|
||||||
|
_note_range_changed_connection = midi_view()->NoteRangeChanged.connect (
|
||||||
|
sigc::mem_fun (*this, &MidiTimeAxisView::note_range_changed));
|
||||||
|
|
||||||
/* ask for notifications of any new RegionViews */
|
/* ask for notifications of any new RegionViews */
|
||||||
_view->RegionViewAdded.connect (
|
_view->RegionViewAdded.connect (
|
||||||
@ -381,19 +383,6 @@ MidiTimeAxisView::setup_midnam_patches ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
MidiTimeAxisView::start_scroomer_update ()
|
|
||||||
{
|
|
||||||
_note_range_changed_connection.disconnect();
|
|
||||||
_note_range_changed_connection = midi_view()->NoteRangeChanged.connect (
|
|
||||||
sigc::mem_fun (*this, &MidiTimeAxisView::note_range_changed));
|
|
||||||
}
|
|
||||||
void
|
|
||||||
MidiTimeAxisView::stop_scroomer_update ()
|
|
||||||
{
|
|
||||||
_note_range_changed_connection.disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MidiTimeAxisView::update_patch_selector ()
|
MidiTimeAxisView::update_patch_selector ()
|
||||||
{
|
{
|
||||||
|
@ -119,8 +119,6 @@ private:
|
|||||||
void setup_midnam_patches ();
|
void setup_midnam_patches ();
|
||||||
void update_patch_selector ();
|
void update_patch_selector ();
|
||||||
|
|
||||||
void start_scroomer_update ();
|
|
||||||
void stop_scroomer_update ();
|
|
||||||
sigc::connection _note_range_changed_connection;
|
sigc::connection _note_range_changed_connection;
|
||||||
|
|
||||||
void model_changed(const std::string& model);
|
void model_changed(const std::string& model);
|
||||||
|
Loading…
Reference in New Issue
Block a user