From 83f5d40280f777c188fe156e8a6fc53fab3e4a60 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Mon, 26 Feb 2024 07:05:33 +0100 Subject: [PATCH] grid/snap: disable broken septuplet option --- gtk2_ardour/editor.cc | 9 +++++++++ gtk2_ardour/editor_tempodisplay.cc | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index bb22173aaa..072b785986 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -3085,6 +3085,9 @@ Editor::_snap_to_bbt (timepos_t const & presnap, Temporal::RoundMode direction, case GridTypeBeatDiv7: case GridTypeBeatDiv14: case GridTypeBeatDiv28: + /* Septuplets suffer from drifting until libtemporal handles fractional ticks + * or if ticks_per_beat (ppqn) is raised to a point where the result + */ divisor = 3.5; break; case GridTypeBeat: @@ -3623,6 +3626,11 @@ Editor::build_grid_type_menu () grid_type_selector.AddMenuElem (Menu_Helpers::MenuElem (_("Quintuplets"), *_quintuplet_menu)); /* septuplet grid */ +#if 0 + /* Septuplets suffer from drifting and can't be draw properly until libtemporal handles fractional ticks + * or if ticks_per_beat (ppqn) is raised to a point where the result + * of Temporal::ticks_per_beat / beat_div is always an integer + */ Gtk::Menu *_septuplet_menu = manage (new Menu); MenuList& septuplet_items (_septuplet_menu->items()); { @@ -3631,6 +3639,7 @@ Editor::build_grid_type_menu () septuplet_items.push_back (MenuElem (grid_type_strings[(int)GridTypeBeatDiv28], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeBeatDiv28))); } grid_type_selector.AddMenuElem (Menu_Helpers::MenuElem (_("Septuplets"), *_septuplet_menu)); +#endif grid_type_selector.AddMenuElem(SeparatorElem()); grid_type_selector.AddMenuElem (MenuElem (grid_type_strings[(int)GridTypeTimecode], sigc::bind (sigc::mem_fun(*this, &Editor::grid_type_selection_done), (GridType) GridTypeTimecode))); diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc index 6ae25a3487..f9a562d256 100644 --- a/gtk2_ardour/editor_tempodisplay.cc +++ b/gtk2_ardour/editor_tempodisplay.cc @@ -374,6 +374,10 @@ Editor::compute_current_bbt_points (Temporal::TempoMapPoints& grid, samplepos_t case GridTypeBeatDiv7: case GridTypeBeatDiv14: case GridTypeBeatDiv28: + /* Septuplets can't be drawn until libtemporal handles fractional ticks + * or if ticks_per_beat (ppqn) is raised to a point where the result + * of Temporal::ticks_per_beat / beat_div is always an integer + */ divisor = 3.5; break; default: