diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-12-14 20:03:40 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-12-14 20:03:40 +0000 |
commit | e3c67bceb864adc10764e901b87ad8b6677caebd (patch) | |
tree | 98cc093e7255dc658bd839a1bbf6c92f76b58331 /libs/ardour/ardour/tempo.h | |
parent | df5e700f90d9fd6c803e8e85c56f3fe8118bc101 (diff) |
implement methods in TempoMap for walking a given distance along a tempo map and returning the resulting time; add a new property, _length_beats, to MidiRegion; use previously mentioned methods to keep _length_beats up to date as regions are moved AND as tempo map changes occur
git-svn-id: svn://localhost/ardour2/branches/3.0@8274 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/tempo.h')
-rw-r--r-- | libs/ardour/ardour/tempo.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index de45c788f1..90d27ebed0 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -204,15 +204,13 @@ class TempoMap : public PBD::StatefulDestructible framecnt_t frame_time (const Timecode::BBT_Time&) const; framecnt_t bbt_duration_at (framepos_t, const Timecode::BBT_Time&, int dir) const; - void bbt_time_add (framepos_t origin, Timecode::BBT_Time& start, const Timecode::BBT_Time& shift); - static const Tempo& default_tempo() { return _default_tempo; } static const Meter& default_meter() { return _default_meter; } const Tempo& tempo_at (framepos_t) const; const Meter& meter_at (framepos_t) const; - const TempoSection& tempo_section_at (framepos_t); + const TempoSection& tempo_section_at (framepos_t) const; void add_tempo(const Tempo&, Timecode::BBT_Time where); void add_meter(const Meter&, Timecode::BBT_Time where); @@ -250,6 +248,9 @@ class TempoMap : public PBD::StatefulDestructible Timecode::BBT_Time bbt_add (const Timecode::BBT_Time& a, const Timecode::BBT_Time& b) const; Timecode::BBT_Time bbt_subtract (const Timecode::BBT_Time&, const Timecode::BBT_Time&) const; + framepos_t framepos_plus_bbt (framepos_t pos, Timecode::BBT_Time b) const; + double framewalk_to_beats (framepos_t pos, framecnt_t distance) const; + void change_existing_tempo_at (framepos_t, double bpm, double note_type); void change_initial_tempo (double bpm, double note_type); |