From a7458d308ba01744cb75a6f610a3a18368fb8831 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 23 Feb 2023 10:17:54 -0700 Subject: [PATCH] midi clock: allow user to "quantize" MIDI clock resolution (GUI edition) --- gtk2_ardour/editor_tempodisplay.cc | 3 +++ gtk2_ardour/rc_option_editor.cc | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 7f12b15391..885532e6d4 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -338,6 +338,9 @@ Editor::tempo_map_changed () TempoMap::SharedPtr current_map = TempoMap::fetch (); + // std::cerr << "\n\n MAP CHANGE @ " << get_microseconds() << std::endl; + // current_map->dump (std::cerr); + /* If the tempo map was changed by something other than the Editor, we * will need to reassociate all visual elements used for tempo display * with the new map. diff --git a/gtk2_ardour/rc_option_editor.cc b/gtk2_ardour/rc_option_editor.cc index 4416defc2c..d487b4049b 100644 --- a/gtk2_ardour/rc_option_editor.cc +++ b/gtk2_ardour/rc_option_editor.cc @@ -3793,6 +3793,15 @@ These settings will only take effect after %1 is restarted.\n\ sigc::mem_fun (*_rc_config, &RCConfiguration::set_send_midi_clock) )); + add_option (_("Transport/Generate"), + new SpinOption ( + "midi-clock-resolution", + _("Resolution of BPM from MIDI Clock"), + sigc::mem_fun (*_rc_config, &RCConfiguration::get_midi_clock_resolution), + sigc::mem_fun (*_rc_config, &RCConfiguration::set_midi_clock_resolution), + 0., 1., 0.01, 0.1, _("quarters"), 1, 2 + )); + add_option (_("Transport"), new OptionEditorHeading (_("Plugins"))); bo = new BoolOption (