diff --git a/libs/temporal/temporal/bbt_time.h b/libs/temporal/temporal/bbt_time.h index 508ceb27b8..5d654c8eaf 100644 --- a/libs/temporal/temporal/bbt_time.h +++ b/libs/temporal/temporal/bbt_time.h @@ -130,6 +130,13 @@ struct LIBTEMPORAL_API BBT_Time << std::setw (2) << beats << "|" << std::setw (4) << ticks; } + + std::string str () const { + std::ostringstream os; + os << bars << '|' << beats << '|' << ticks; + return os.str (); + } + }; struct LIBTEMPORAL_API BBT_Offset diff --git a/libs/temporal/temporal/beats.h b/libs/temporal/temporal/beats.h index d400e273dd..528db61890 100644 --- a/libs/temporal/temporal/beats.h +++ b/libs/temporal/temporal/beats.h @@ -238,6 +238,12 @@ public: static Beats one_tick() { return Beats(0, 1); } + std::string str () const { + std::ostringstream os; + os << get_beats() << ':' << get_ticks(); + return os.str(); + } + protected: int64_t _ticks;