From a4f26f91c80fc6e96f93a7932b8a18a2f4eda87c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 16 Apr 2022 11:10:43 -0600 Subject: [PATCH] parametize default MIDI scroomer (and thus MIDI track) note range --- gtk2_ardour/midi_streamview.cc | 4 ++-- gtk2_ardour/ui_config_vars.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/midi_streamview.cc b/gtk2_ardour/midi_streamview.cc index 9adcc0f93b..dc6c9edda6 100644 --- a/gtk2_ardour/midi_streamview.cc +++ b/gtk2_ardour/midi_streamview.cc @@ -67,8 +67,8 @@ MidiStreamView::MidiStreamView (MidiTimeAxisView& tv) , note_range_adjustment(0.0f, 0.0f, 0.0f) , _range_dirty(false) , _range_sum_cache(-1.0) - , _lowest_note(60) - , _highest_note(71) + , _lowest_note(UIConfiguration::instance().get_default_lower_midi_note()) + , _highest_note(UIConfiguration::instance().get_default_upper_midi_note()) , _data_note_min(60) , _data_note_max(71) , _note_lines (0) diff --git a/gtk2_ardour/ui_config_vars.h b/gtk2_ardour/ui_config_vars.h index 13d244b60b..845134e3a7 100644 --- a/gtk2_ardour/ui_config_vars.h +++ b/gtk2_ardour/ui_config_vars.h @@ -136,6 +136,8 @@ UI_CONFIG_VARIABLE (bool, show_region_name, "show-region-name", true) UI_CONFIG_VARIABLE (int, time_axis_name_ellipsize_mode, "time-axis-name-ellipsize-mode", 0) UI_CONFIG_VARIABLE (bool, show_triggers_inline, "show-triggers-inline", false) UI_CONFIG_VARIABLE (bool, one_plugin_window_only, "one-plugin-window-only", false) +UI_CONFIG_VARIABLE (int, default_lower_midi_note, "default-lower-midi-note", 60) +UI_CONFIG_VARIABLE (int, default_upper_midi_note, "default-upper-midi-note", 71) /* these are visibility-type selections in the New Track dialog that we should make persistent for the user's choices */ UI_CONFIG_VARIABLE (bool, show_on_cue_page, "show-on-cue-page", true)