summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_markers.cc
diff options
context:
space:
mode:
authornick_m <mainsbridge@gmail.com>2016-04-26 03:21:48 +1000
committernick_m <mainsbridge@gmail.com>2016-05-27 23:38:15 +1000
commite0607ca913bde8f3551cb8e7dc0d3bec5203159c (patch)
tree5e5619a966f086b3ea7590cfe4ac515c44a57e5a /gtk2_ardour/editor_markers.cc
parent54758ddd4a339b5d2e2e8bedfb4187f2f98ce51c (diff)
Tempo ramps - add gui dilation of tempos.
- a meter can be dragged using the constraint modifier, which sets the previous tempo accordingly. This could be added to the bbt ruler to allow direct dragging of beats and bars, but the exact behavior of that is still undecided. comments? - also preliminary work on the necessary tempos locked to audio-locked meters.
Diffstat (limited to 'gtk2_ardour/editor_markers.cc')
-rw-r--r--gtk2_ardour/editor_markers.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_markers.cc b/gtk2_ardour/editor_markers.cc
index 74e35a246b..9664d6f65f 100644
--- a/gtk2_ardour/editor_markers.cc
+++ b/gtk2_ardour/editor_markers.cc
@@ -1426,9 +1426,12 @@ Editor::toggle_tempo_type ()
begin_reversible_command (_("change tempo type"));
XMLNode &before = _session->tempo_map().get_state();
TempoSection* tsp = &tm->tempo();
- _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type())
- , (tsp->position_lock_style() == MusicTime) ? tsp->pulse() : tsp->frame()
- , (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp);
+ if (tsp->position_lock_style() == AudioTime) {
+ _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()), tsp->frame(), (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp);
+ } else {
+ _session->tempo_map().replace_tempo (*tsp, Tempo (tsp->beats_per_minute(), tsp->note_type()), tsp->pulse(), (tsp->type() == TempoSection::Ramp) ? TempoSection::Constant : TempoSection::Ramp);
+ }
+
XMLNode &after = _session->tempo_map().get_state();
_session->add_command(new MementoCommand<TempoMap>(_session->tempo_map(), &before, &after));
commit_reversible_command ();