allow negative superclock -> negative beats computation
This commit is contained in:
parent
1e84f217ac
commit
fee4292bde
@ -527,7 +527,7 @@ TempoPoint::quarters_at_superclock (superclock_t sc) const
|
|||||||
|
|
||||||
if (!actually_ramped()) {
|
if (!actually_ramped()) {
|
||||||
|
|
||||||
assert (sc >= _sclock);
|
// assert (sc >= _sclock);
|
||||||
superclock_t sc_delta = sc - _sclock;
|
superclock_t sc_delta = sc - _sclock;
|
||||||
|
|
||||||
/* convert sc into superbeats, given that sc represents some number of seconds */
|
/* convert sc into superbeats, given that sc represents some number of seconds */
|
||||||
@ -544,6 +544,10 @@ TempoPoint::quarters_at_superclock (superclock_t sc) const
|
|||||||
|
|
||||||
Tempo::superbeats_to_beats_ticks (superbeats, b, t);
|
Tempo::superbeats_to_beats_ticks (superbeats, b, t);
|
||||||
|
|
||||||
|
if (sc < _sclock) {
|
||||||
|
std::cout << string_compose ("%8 => \nsc %1 delta %9 = %2 secs rem = %3 rem snotes %4 sbeats = %5 => %6 : %7\n", sc, whole_seconds, remainder, supernotes, superbeats, b , t, *this, sc_delta);
|
||||||
|
}
|
||||||
|
|
||||||
DEBUG_TRACE (DEBUG::TemporalMap, string_compose ("%8 => \nsc %1 delta %9 = %2 secs rem = %3 rem snotes %4 sbeats = %5 => %6 : %7\n", sc, whole_seconds, remainder, supernotes, superbeats, b , t, *this, sc_delta));
|
DEBUG_TRACE (DEBUG::TemporalMap, string_compose ("%8 => \nsc %1 delta %9 = %2 secs rem = %3 rem snotes %4 sbeats = %5 => %6 : %7\n", sc, whole_seconds, remainder, supernotes, superbeats, b , t, *this, sc_delta));
|
||||||
|
|
||||||
return _quarters + Beats (b, t);
|
return _quarters + Beats (b, t);
|
||||||
|
Loading…
Reference in New Issue
Block a user