From c505024a4bbefefd61e1ba9d3a6f7a28f0b5c478 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 5 Dec 2022 10:01:43 -0700 Subject: [PATCH] temporal: when resetting the map, position BBT markers in beat time (and stop reset there) --- libs/temporal/tempo.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/temporal/tempo.cc b/libs/temporal/tempo.cc index ecdd14e59d..095da87e36 100644 --- a/libs/temporal/tempo.cc +++ b/libs/temporal/tempo.cc @@ -1275,6 +1275,13 @@ TempoMap::reset_starting_at (superclock_t sc) p->set (sc, metric.meter().quarters_at (p->bbt()), p->bbt()); } else { DEBUG_TRACE (DEBUG::MapReset, "\tnot recomputing this one\n"); + /* Retain the audio time and BBT time for this music + time point, but reset the beat time position to + reflect the previous tempo & meter. + */ + p->set (p->sclock(), metric.meter().quarters_at (p->bbt()), p->bbt()); + /* We reached a BBT marker ... we should stop resetting */ + break; } /* Now ensure that metric is correct moving forward */