From 94e7e4e53b0678674ed7c9b2e899fda395a6e90d Mon Sep 17 00:00:00 2001 From: nick_m Date: Sun, 17 Apr 2016 04:26:19 +1000 Subject: [PATCH] Tempo ramps - before the first meter, the beat is 0.0 --- libs/ardour/tempo.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 978d4ed05a..7aa86d38b0 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -1542,6 +1542,9 @@ TempoMap::beat_at_frame_locked (const Metrics& metrics, const framecnt_t& frame) { const MeterSection& prev_m = meter_section_at_locked (metrics, frame); const TempoSection& ts = tempo_section_at_locked (metrics, frame); + if (frame < prev_m.frame()) { + return 0.0; + } return prev_m.beat() + (ts.pulse_at_frame (frame, _frame_rate) - prev_m.pulse()) * prev_m.note_divisor(); }