diff options
author | nick_m <mainsbridge@gmail.com> | 2016-03-13 07:20:16 +1100 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2016-05-27 23:38:11 +1000 |
commit | ec791c8dd41c2f4876cf11047f53315d724ae538 (patch) | |
tree | 17c8ae6fd83082a13dd2f739613bc6f00a806d04 /libs/ardour/ardour/tempo.h | |
parent | 3a2ff0a4a740421267254896ff25c17b5280b3cf (diff) |
Tempo ramps - hook up tempo display, a new approach to audio-locked meters
- audio locked meters define an offset which is used for all public
TempoMap methods while the internal map remains contiguous.
Probably a few unexpected consequences here, but seems to work mostly.
Diffstat (limited to 'libs/ardour/ardour/tempo.h')
-rw-r--r-- | libs/ardour/ardour/tempo.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/ardour/ardour/tempo.h b/libs/ardour/ardour/tempo.h index f6eb722c01..4a193f1240 100644 --- a/libs/ardour/ardour/tempo.h +++ b/libs/ardour/ardour/tempo.h @@ -401,7 +401,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible XMLNode& get_state (void); int set_state (const XMLNode&, int version); - void dump (std::ostream&) const; + void dump (Metrics& metrics, std::ostream&) const; void clear (); TempoMetric metric_at (Timecode::BBT_Time bbt) const; @@ -430,13 +430,16 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible PBD::Signal0<void> MetricPositionChanged; private: - double bbt_to_beats_locked (Metrics& metrics, Timecode::BBT_Time bbt); + double bbt_to_beats_locked (const Metrics& metrics, Timecode::BBT_Time bbt); Timecode::BBT_Time beats_to_bbt_locked (Metrics& metrics, double beats); double beat_at_frame_locked (Metrics& metrics, framecnt_t frame) const; - framecnt_t frame_at_beat_locked (Metrics& metrics, double beat) const; + framecnt_t frame_at_beat_locked (const Metrics& metrics, double beat) const; double tick_at_frame_locked (const Metrics& metrics, framecnt_t frame) const; + double tick_offset_at (const Metrics& metrics, double tick) const; + framecnt_t frame_offset_at (const Metrics& metrics, framepos_t frame) const; + framecnt_t frame_at_tick_locked (const Metrics& metrics, double tick) const; - framepos_t frame_time_locked (Metrics& metrics, const Timecode::BBT_Time&); + framepos_t frame_time_locked (const Metrics& metrics, const Timecode::BBT_Time&); bool check_solved (Metrics& metrics, bool by_frame); bool solve_map (Metrics& metrics, TempoSection* section, const Tempo& bpm, const framepos_t& frame); |