+ bbt_time(), beat_at_frame(), frame_at_beat(), frame_time()
+ and bbt_duration_at()
+ are all sensitive to tempo and meter, and will give answers
+ that align with the grid formed by tempo and meter sections.
+
+ They SHOULD NOT be used to determine the position of events
+ whose location is canonically defined in beats.
+ */
+
+ double beat_at_frame (const framecnt_t& frame) const;
+ framecnt_t frame_at_beat (const double& beat) const;
+
+ Tempo tempo_at_frame (const framepos_t& frame) const;
+ framepos_t frame_at_tempo (const Tempo& tempo) const;
+
+ const Meter& meter_at_frame (framepos_t) const;
+
+ /* you probably only need to use pulses when moving tempos */
+ double pulse_at_beat (const double& beat) const;
+ double beat_at_pulse (const double& pulse) const;
+
+ double pulse_at_frame (const framecnt_t& frame) const;
+ framecnt_t frame_at_pulse (const double& pulse) const;
+
+ /* bbt - it's nearly always better to use beats.*/
+ Timecode::BBT_Time bbt_at_frame (framepos_t when);
+ framepos_t frame_at_bbt (const Timecode::BBT_Time&);
+
+ double beat_at_bbt (const Timecode::BBT_Time& bbt);
+ Timecode::BBT_Time bbt_at_beat (const double& beats);
+
+ double pulse_at_bbt (const Timecode::BBT_Time& bbt);
+ Timecode::BBT_Time bbt_at_pulse (const double& pulse);
+
+ framecnt_t bbt_duration_at (framepos_t, const Timecode::BBT_Time&, int dir);
+
+ /* TEMPO-SENSITIVE FUNCTIONS
+
+ These next 4 functions will all take tempo in account and should be
+ used to determine position (and in the last case, distance in beats)
+ when tempo matters but meter does not.
+
+ They SHOULD be used to determine the position of events
+ whose location is canonically defined in beats.
+ */
+
+ framepos_t framepos_plus_bbt (framepos_t pos, Timecode::BBT_Time b) const;
+ framepos_t framepos_plus_beats (framepos_t, Evoral::Beats) const;
+ framepos_t framepos_minus_beats (framepos_t, Evoral::Beats) const;
+ Evoral::Beats framewalk_to_beats (framepos_t pos, framecnt_t distance) const;
+
+ std::pair<double, framepos_t> predict_tempo_position (TempoSection* section, const Timecode::BBT_Time& bbt);
+ void gui_move_tempo (TempoSection*, const framepos_t& frame);
+ void gui_move_meter (MeterSection*, const framepos_t& frame);
+ bool gui_change_tempo (TempoSection*, const Tempo& bpm);
+ void gui_dilate_tempo (TempoSection* tempo, const framepos_t& frame, const framepos_t& end_frame, const double& pulse);
+
+ bool can_solve_bbt (TempoSection* section, const Timecode::BBT_Time& bbt);
+
+ PBD::Signal0<void> MetricPositionChanged;
+ void fix_legacy_session();