From b6e1846c39bce698f2e13ac32b89e2a9d467713e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 13 May 2025 11:59:43 -0600 Subject: [PATCH] temporal: fix implementation of timepos_t::operator+= (BBT_Offset const &) TempoMap::bbtwalk_to_quarters() converts the distance of the walk into quarters, but we need the endpoint of the walk --- libs/temporal/timeline.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/temporal/timeline.cc b/libs/temporal/timeline.cc index 1dc314277a..7025ecc08c 100644 --- a/libs/temporal/timeline.cc +++ b/libs/temporal/timeline.cc @@ -778,7 +778,8 @@ timepos_t::operator+= (Temporal::BBT_Offset const & offset) { TempoMap::SharedPtr tm (TempoMap::use()); if (is_beats()) { - v = build (true, tm->bbtwalk_to_quarters (beats(), offset).to_ticks()); + Temporal::Beats r = tm->quarters_at (tm->bbt_walk (tm->bbt_at (beats()), offset)); + v = build (true, r.to_ticks()); } else { v = build (false, tm->superclock_at (tm->bbt_walk (BBT_Argument (this->superclocks(), tm->bbt_at (*this)), offset))); }