grid/snap: disable broken septuplet option

This commit is contained in:
jean-emmanuel 2024-02-26 07:05:33 +01:00 committed by Robin Gareus
parent af023cc516
commit 83f5d40280
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 13 additions and 0 deletions

View File

@ -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)));

View File

@ -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: