diff options
author | nick_m <mainsbridge@gmail.com> | 2016-03-23 01:11:00 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-05-27 23:38:12 +1000 |
commit | 58d4889ad359d43f12c7ce7a0a0e9355b936f30a (patch) | |
tree | a4ac37af2cb5667f87a47c598837c7044e60373d /gtk2_ardour/editor_drag.cc | |
parent | ba3ae54f516fc447ad1828cf99ca22d352189c71 (diff) |
Tempo ramps - music-locked meters now use beats rather than pulses as their reference.
- fixes many problems with a non-zero audio-locked first meter.
Diffstat (limited to 'gtk2_ardour/editor_drag.cc')
-rw-r--r-- | gtk2_ardour/editor_drag.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_drag.cc b/gtk2_ardour/editor_drag.cc index 3e46a0a3fe..fdb0f695fd 100644 --- a/gtk2_ardour/editor_drag.cc +++ b/gtk2_ardour/editor_drag.cc @@ -3182,7 +3182,7 @@ MeterMarkerDrag::motion (GdkEvent* event, bool first_move) _marker->hide(); } - framepos_t const pf = adjusted_current_frame (event); + framepos_t const pf = adjusted_current_frame (event, false); _marker->set_position (pf); if (_marker->meter().position_lock_style() == MusicTime) { double const baf = _editor->session()->tempo_map().beat_at_frame (_editor->session()->tempo_map().round_to_bar (pf, (RoundMode) 0)); @@ -3366,8 +3366,8 @@ TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred) XMLNode &before = map.get_state(); if (_marker->tempo().position_lock_style() == MusicTime) { - double const beat = map.predict_tempo_beat (_real_section, _marker->tempo(), _real_section->frame()); - map.add_tempo (_marker->tempo(), beat, _marker->tempo().type()); + double const pulse = map.predict_tempo_pulse (_real_section, _marker->tempo(), _real_section->frame()); + map.add_tempo (_marker->tempo(), pulse, _marker->tempo().type()); } else { map.add_tempo (_marker->tempo(), _real_section->frame(), _marker->tempo().type()); } @@ -3377,11 +3377,10 @@ TempoMarkerDrag::finished (GdkEvent* event, bool movement_occurred) _editor->commit_reversible_command (); } else { - /* we removed it before, so add it back now */ if (_marker->tempo().position_lock_style() == MusicTime) { - double const beat = map.predict_tempo_beat (_real_section, _marker->tempo(), _real_section->frame()); + double const pulse = map.predict_tempo_pulse (_real_section, _marker->tempo(), _real_section->frame()); map.replace_tempo (*_real_section, Tempo (_marker->tempo().beats_per_minute(), _marker->tempo().note_type()) - , beat, _marker->tempo().type()); + , pulse, _marker->tempo().type()); } else { map.replace_tempo (*_real_section, Tempo (_marker->tempo().beats_per_minute(), _marker->tempo().note_type()) , _real_section->frame(), _marker->tempo().type()); |