temporal: fix a bug in BBT_Time::round_up_to_bar()

Also remove Meter:: versions of related methods, because they are not necessary. We
only need metrical information for operations like ::round_to_bar()
This commit is contained in:
Paul Davis 2022-08-03 10:59:29 -06:00
parent 076ad9a9b6
commit cc6a437faf
5 changed files with 19 additions and 35 deletions

View file

@ -23,6 +23,20 @@
using namespace Temporal;
BBT_Time
BBT_Time::round_up_to_bar() const
{
if (ticks == 0 && beats == 1) {
return *this;
}
BBT_Time b = round_up_to_beat ();
if (b.beats > 1) {
b.bars += 1;
b.beats = 1;
}
return b;
}
BBT_Offset::BBT_Offset (double dbeats)
{
/* NOTE: this does not construct a BBT time in a canonical form,