From 3f3ad715efbcdbb16ff1791555fd575403bbfc4d Mon Sep 17 00:00:00 2001 From: nick_m Date: Thu, 24 Mar 2016 22:09:48 +1100 Subject: [PATCH] Tempo ramps - minor cleanup. --- libs/ardour/tempo.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 3ab6063526..36cf1af73f 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1397,13 +1397,10 @@ TempoMap::recompute_meters (Metrics& metrics) if (meter->position_lock_style() == AudioTime) { pair bt = make_pair (accumulated_beats, BBT_Time (accumulated_bars + 1, 1, 0)); meter->set_beat (bt); - - meter->set_pulse (pulse_at_frame_locked (metrics, meter->frame())); } else { meter->set_frame (frame_at_pulse_locked (metrics, prev_m->pulse() + (meter->beat() - prev_m->beat()) / prev_m->note_divisor())); - meter->set_pulse (pulse_at_frame_locked (metrics, meter->frame())); } - + meter->set_pulse (pulse_at_frame_locked (metrics, meter->frame())); prev_m = meter; } } @@ -2116,12 +2113,11 @@ TempoMap::solve_map (Metrics& imaginary, MeterSection* section, const Meter& mt, if (prev_ms) { if (m->position_lock_style() == MusicTime) { m->set_frame (frame_at_pulse_locked (imaginary, prev_ms->pulse() + (m->beat() - prev_ms->beat()) / prev_ms->note_divisor())); - m->set_pulse (pulse_at_frame_locked (imaginary, m->frame())); } else { pair b_bbt = make_pair (accumulated_beats, BBT_Time (accumulated_bars + 1, 1, 0)); m->set_beat (b_bbt); - m->set_pulse (pulse_at_frame_locked (imaginary, m->frame())); } + m->set_pulse (pulse_at_frame_locked (imaginary, m->frame())); } prev_ms = m; } @@ -2162,7 +2158,7 @@ TempoMap::solve_map (Metrics& imaginary, MeterSection* section, const Meter& mt, (meters should go on absolute pulses to keep us sane) */ pair b_bbt = make_pair (accumulated_beats, BBT_Time (accumulated_bars + 1, 1, 0)); - m->set_pulse (pulse_at_frame_locked (imaginary, m->frame())); + m->set_pulse (pulse_at_frame_locked (imaginary, frame)); m->set_beat (b_bbt); prev_ms = m; continue; @@ -2170,12 +2166,11 @@ TempoMap::solve_map (Metrics& imaginary, MeterSection* section, const Meter& mt, if (prev_ms) { if (m->position_lock_style() == MusicTime) { m->set_frame (frame_at_pulse_locked (imaginary, prev_ms->pulse() + (m->beat() - prev_ms->beat()) / prev_ms->note_divisor())); - m->set_pulse (pulse_at_frame_locked (imaginary, m->frame())); } else { pair b_bbt = make_pair (accumulated_beats, BBT_Time (accumulated_bars + 1, 1, 0)); m->set_beat (b_bbt); - m->set_pulse (pulse_at_frame_locked (imaginary, frame)); } + m->set_pulse (pulse_at_frame_locked (imaginary, m->frame())); } prev_ms = m; }