diff --git a/libs/temporal/temporal/beats.h b/libs/temporal/temporal/beats.h index f031c36711..80c26593eb 100644 --- a/libs/temporal/temporal/beats.h +++ b/libs/temporal/temporal/beats.h @@ -119,8 +119,9 @@ public: } /** Create from ticks at the standard PPQN. */ - static Beats ticks(int32_t ticks) { - return Beats(0, ticks); + static Beats ticks(int64_t ticks) { + assert (ticks/PPQN < std::numeric_limits::max()); + return Beats (ticks / PPQN, ticks % PPQN); } /** Create from ticks at a given rate.