From c57db8106857c061d61380d3491cac4e4746db42 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 8 Jan 2012 17:19:29 +0000 Subject: [PATCH] don't allow/create non-beat aligned tempo changes in response to meter changes. round the position of a tempo change the earlier beat that it would have followed according to its bar_offset value git-svn-id: svn://localhost/ardour2/branches/3.0@11199 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/tempo.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index d1458dba6d..8b59b06de6 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -182,8 +182,8 @@ TempoSection::update_bbt_time_from_bar_offset (const Meter& meter) new_start.bars = start().bars; double ticks = BBT_Time::ticks_per_beat * meter.divisions_per_bar() * _bar_offset; - new_start.beats = (uint32_t) floor(ticks/BBT_Time::ticks_per_beat); - new_start.ticks = (uint32_t) fmod (ticks, BBT_Time::ticks_per_beat); + new_start.beats = (uint32_t) floor (ticks/BBT_Time::ticks_per_beat); + new_start.ticks = 0; /* (uint32_t) fmod (ticks, BBT_Time::ticks_per_beat); */ /* remember the 1-based counting properties of beats */ new_start.beats += 1;