From 7fbe17c802540d98291313a31d1be8b54ef2163e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 24 Jul 2023 16:19:56 -0600 Subject: [PATCH] BBT markers must define an on-beat position --- libs/temporal/tempo.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/temporal/tempo.cc b/libs/temporal/tempo.cc index 831917a5ae..d2e8010c12 100644 --- a/libs/temporal/tempo.cc +++ b/libs/temporal/tempo.cc @@ -1497,6 +1497,13 @@ MusicTimePoint* TempoMap::add_or_replace_bartime (MusicTimePoint* mtp) { bool replaced; + + /* A MusicTimePoint by definition defines a beat position. It's not + * zero, but it must be "on beat". So ensure that this is true. + */ + + mtp->set (mtp->sclock(), mtp->beats().round_up_to_beat(), mtp->bbt()); + MusicTimePoint* ret = core_add_bartime (mtp, replaced); if (!replaced) {