+ static const Tempo& default_tempo() { return _default_tempo; }
+ static const Meter& default_meter() { return _default_meter; }
+
+ /* because tempos may be ramped, this is only valid for the instant requested.*/
+ double frames_per_beat_at (const framepos_t&, const framecnt_t& sr) const;
+
+ const TempoSection& tempo_section_at_frame (framepos_t frame) const;
+ const MeterSection& meter_section_at_frame (framepos_t frame) const;
+ const MeterSection& meter_section_at_beat (double beat) const;
+
+ /** add a tempo section locked to pls. ignored values will be set in recompute_tempos()
+ * @param pulse pulse position of new section. ignored if pls == AudioTime
+ * @param frame frame position of new section. ignored if pls == MusicTime
+ * @param type type of new tempo section (Ramp, Constant)
+ */
+ TempoSection* add_tempo (const Tempo&, const double& pulse, const framepos_t& frame, TempoSection::Type type, PositionLockStyle pls);
+
+ /** add an meter section locked to pls.. ignored values will be set in recompute_meters()
+ * @param beat beat position of new section
+ * @param where bbt position of new section
+ * @param frame frame position of new section. ignored if pls == MusicTime
+ */
+ MeterSection* add_meter (const Meter&, const double& beat, const Timecode::BBT_Time& where, const framepos_t& frame, PositionLockStyle pls);
+
+ void remove_tempo (const TempoSection&, bool send_signal);
+ void remove_meter (const MeterSection&, bool send_signal);
+
+ void replace_tempo (const TempoSection&, const Tempo&, const double& pulse, const framepos_t& frame
+ , TempoSection::Type type, PositionLockStyle pls);
+
+ void replace_meter (const MeterSection&, const Meter&, const Timecode::BBT_Time& where, const framepos_t& frame
+ , PositionLockStyle pls);
+
+ framepos_t round_to_bar (framepos_t frame, RoundMode dir);
+ framepos_t round_to_beat (framepos_t frame, RoundMode dir);
+ framepos_t round_to_beat_subdivision (framepos_t fr, int sub_num, RoundMode dir);
+
+ void set_length (framepos_t frames);
+
+ XMLNode& get_state (void);
+ int set_state (const XMLNode&, int version);
+
+ void dump (const Metrics& metrics, std::ostream&) const;
+ void clear ();
+
+ TempoMetric metric_at (Timecode::BBT_Time bbt) const;
+
+ /** Return the TempoMetric at frame @p t, and point @p last to the latest
+ * metric change <= t, if it is non-NULL.
+ */
+ TempoMetric metric_at (framepos_t, Metrics::const_iterator* last=NULL) const;
+
+ Metrics::const_iterator metrics_end() { return _metrics.end(); }
+
+ void change_existing_tempo_at (framepos_t, double bpm, double note_type);
+ void change_initial_tempo (double bpm, double note_type);
+
+ void insert_time (framepos_t, framecnt_t);
+ bool remove_time (framepos_t where, framecnt_t amount); //returns true if anything was moved
+
+ int n_tempos () const;
+ int n_meters () const;
+
+ framecnt_t frame_rate () const { return _frame_rate; }
+