temporal: add a new ::set_tempo() method for use when loading older tempo maps
This commit is contained in:
parent
7be61b0909
commit
f8d86c8d19
@ -1390,6 +1390,19 @@ TempoMap::set_tempo (Tempo const & t, timepos_t const & time)
|
||||
return *ret;
|
||||
}
|
||||
|
||||
TempoPoint &
|
||||
TempoMap::set_tempo (Tempo const & t, timepos_t const & time, Beats const & beats)
|
||||
{
|
||||
assert (!time.is_beats());
|
||||
BBT_Time bbt;
|
||||
|
||||
TempoMetric metric (metric_at (beats, false));
|
||||
bbt = metric.bbt_at (beats);
|
||||
TempoPoint* tp = new TempoPoint (*this, t, time.superclocks(), beats, bbt);
|
||||
TempoPoint* ret = add_tempo (tp);
|
||||
return *ret;
|
||||
}
|
||||
|
||||
void
|
||||
TempoMap::core_add_point (Point* pp)
|
||||
{
|
||||
|
@ -1180,6 +1180,7 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
|
||||
int parse_tempo_state_3x (const XMLNode& node, LegacyTempoState& lts);
|
||||
int parse_meter_state_3x (const XMLNode& node, LegacyMeterState& lts);
|
||||
int set_state_3x (XMLNode const &);
|
||||
TempoPoint & set_tempo (Tempo const & t, timepos_t const & time, Beats const & beats);
|
||||
|
||||
friend class TempoPoint;
|
||||
friend class MeterPoint;
|
||||
|
Loading…
Reference in New Issue
Block a user