Add Beat/20 grid subdivision. Fixes #3126.
git-svn-id: svn://localhost/ardour2/branches/3.0@7627 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3b93174963
commit
35cd944f40
@ -27,6 +27,7 @@ SNAPTYPE(SnapToMinutes)
|
|||||||
SNAPTYPE(SnapToBeatDiv32)
|
SNAPTYPE(SnapToBeatDiv32)
|
||||||
SNAPTYPE(SnapToBeatDiv28)
|
SNAPTYPE(SnapToBeatDiv28)
|
||||||
SNAPTYPE(SnapToBeatDiv24)
|
SNAPTYPE(SnapToBeatDiv24)
|
||||||
|
SNAPTYPE(SnapToBeatDiv20)
|
||||||
SNAPTYPE(SnapToBeatDiv16)
|
SNAPTYPE(SnapToBeatDiv16)
|
||||||
SNAPTYPE(SnapToBeatDiv14)
|
SNAPTYPE(SnapToBeatDiv14)
|
||||||
SNAPTYPE(SnapToBeatDiv12)
|
SNAPTYPE(SnapToBeatDiv12)
|
||||||
|
@ -148,6 +148,7 @@ static const gchar *_snap_type_strings[] = {
|
|||||||
N_("Beats/32"),
|
N_("Beats/32"),
|
||||||
N_("Beats/28"),
|
N_("Beats/28"),
|
||||||
N_("Beats/24"),
|
N_("Beats/24"),
|
||||||
|
N_("Beats/20"),
|
||||||
N_("Beats/16"),
|
N_("Beats/16"),
|
||||||
N_("Beats/14"),
|
N_("Beats/14"),
|
||||||
N_("Beats/12"),
|
N_("Beats/12"),
|
||||||
@ -2249,6 +2250,7 @@ Editor::set_snap_to (SnapType st)
|
|||||||
case SnapToBeatDiv32:
|
case SnapToBeatDiv32:
|
||||||
case SnapToBeatDiv28:
|
case SnapToBeatDiv28:
|
||||||
case SnapToBeatDiv24:
|
case SnapToBeatDiv24:
|
||||||
|
case SnapToBeatDiv20:
|
||||||
case SnapToBeatDiv16:
|
case SnapToBeatDiv16:
|
||||||
case SnapToBeatDiv14:
|
case SnapToBeatDiv14:
|
||||||
case SnapToBeatDiv12:
|
case SnapToBeatDiv12:
|
||||||
@ -2813,6 +2815,9 @@ Editor::snap_to_internal (nframes64_t& start, int32_t direction, bool for_mark)
|
|||||||
case SnapToBeatDiv24:
|
case SnapToBeatDiv24:
|
||||||
start = _session->tempo_map().round_to_beat_subdivision (start, 24, direction);
|
start = _session->tempo_map().round_to_beat_subdivision (start, 24, direction);
|
||||||
break;
|
break;
|
||||||
|
case SnapToBeatDiv20:
|
||||||
|
start = _session->tempo_map().round_to_beat_subdivision (start, 20, direction);
|
||||||
|
break;
|
||||||
case SnapToBeatDiv16:
|
case SnapToBeatDiv16:
|
||||||
start = _session->tempo_map().round_to_beat_subdivision (start, 16, direction);
|
start = _session->tempo_map().round_to_beat_subdivision (start, 16, direction);
|
||||||
break;
|
break;
|
||||||
@ -3616,6 +3621,8 @@ Editor::snap_type_selection_done ()
|
|||||||
snaptype = SnapToBeatDiv14;
|
snaptype = SnapToBeatDiv14;
|
||||||
} else if (choice == _("Beats/16")) {
|
} else if (choice == _("Beats/16")) {
|
||||||
snaptype = SnapToBeatDiv16;
|
snaptype = SnapToBeatDiv16;
|
||||||
|
} else if (choice == _("Beats/20")) {
|
||||||
|
snaptype = SnapToBeatDiv20;
|
||||||
} else if (choice == _("Beats/24")) {
|
} else if (choice == _("Beats/24")) {
|
||||||
snaptype = SnapToBeatDiv24;
|
snaptype = SnapToBeatDiv24;
|
||||||
} else if (choice == _("Beats/28")) {
|
} else if (choice == _("Beats/28")) {
|
||||||
@ -4017,6 +4024,9 @@ Editor::get_grid_type_as_beats (bool& success, nframes64_t position)
|
|||||||
case SnapToBeatDiv24:
|
case SnapToBeatDiv24:
|
||||||
return 1.0/24.0;
|
return 1.0/24.0;
|
||||||
break;
|
break;
|
||||||
|
case SnapToBeatDiv20:
|
||||||
|
return 1.0/20.0;
|
||||||
|
break;
|
||||||
case SnapToBeatDiv16:
|
case SnapToBeatDiv16:
|
||||||
return 1.0/16.0;
|
return 1.0/16.0;
|
||||||
break;
|
break;
|
||||||
|
@ -736,6 +736,7 @@ Editor::register_actions ()
|
|||||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv32)));
|
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-thirtyseconds"), _("Snap to Thirty Seconds"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv32)));
|
||||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyeighths"), _("Snap to Twenty Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv28)));
|
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyeighths"), _("Snap to Twenty Eighths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv28)));
|
||||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyfourths"), _("Snap to Twenty Fourths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv24)));
|
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentyfourths"), _("Snap to Twenty Fourths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv24)));
|
||||||
|
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twentieths"), _("Snap to Twentieths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv20)));
|
||||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to Sixteenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv16)));
|
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-asixteenthbeat"), _("Snap to Sixteenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv16)));
|
||||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-fourteenths"), _("Snap to Fourteenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv14)));
|
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-fourteenths"), _("Snap to Fourteenths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv14)));
|
||||||
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twelfths"), _("Snap to Tweflths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv12)));
|
ActionManager::register_radio_action (snap_actions, snap_choice_group, X_("snap-to-twelfths"), _("Snap to Tweflths"), (sigc::bind (sigc::mem_fun(*this, &Editor::snap_type_chosen), Editing::SnapToBeatDiv12)));
|
||||||
@ -1008,6 +1009,9 @@ Editor::snap_type_action (SnapType type)
|
|||||||
case Editing::SnapToBeatDiv24:
|
case Editing::SnapToBeatDiv24:
|
||||||
action = "snap-to-twentyfourths";
|
action = "snap-to-twentyfourths";
|
||||||
break;
|
break;
|
||||||
|
case Editing::SnapToBeatDiv20:
|
||||||
|
action = "snap-to-twentieths";
|
||||||
|
break;
|
||||||
case Editing::SnapToBeatDiv16:
|
case Editing::SnapToBeatDiv16:
|
||||||
action = "snap-to-asixteenthbeat";
|
action = "snap-to-asixteenthbeat";
|
||||||
break;
|
break;
|
||||||
@ -1108,6 +1112,9 @@ Editor::cycle_snap_choice()
|
|||||||
set_snap_to (Editing::SnapToBeatDiv24);
|
set_snap_to (Editing::SnapToBeatDiv24);
|
||||||
break;
|
break;
|
||||||
case Editing::SnapToBeatDiv24:
|
case Editing::SnapToBeatDiv24:
|
||||||
|
set_snap_to (Editing::SnapToBeatDiv20);
|
||||||
|
break;
|
||||||
|
case Editing::SnapToBeatDiv20:
|
||||||
set_snap_to (Editing::SnapToBeatDiv16);
|
set_snap_to (Editing::SnapToBeatDiv16);
|
||||||
break;
|
break;
|
||||||
case Editing::SnapToBeatDiv16:
|
case Editing::SnapToBeatDiv16:
|
||||||
|
@ -1194,6 +1194,10 @@ Editor::compute_bbt_ruler_scale (nframes64_t lower, nframes64_t upper)
|
|||||||
bbt_beat_subdivision = 16;
|
bbt_beat_subdivision = 16;
|
||||||
bbt_accent_modulo = 4;
|
bbt_accent_modulo = 4;
|
||||||
break;
|
break;
|
||||||
|
case SnapToBeatDiv20:
|
||||||
|
bbt_beat_subdivision = 20;
|
||||||
|
bbt_accent_modulo = 5;
|
||||||
|
break;
|
||||||
case SnapToBeatDiv24:
|
case SnapToBeatDiv24:
|
||||||
bbt_beat_subdivision = 24;
|
bbt_beat_subdivision = 24;
|
||||||
bbt_accent_modulo = 6;
|
bbt_accent_modulo = 6;
|
||||||
|
Loading…
Reference in New Issue
Block a user