ardour
|
#include <tempo.h>
Classes | |
struct | BBTPoint |
Public Types | |
enum | BBTPointType { Bar, Beat } |
typedef std::vector< BBTPoint > | BBTPointList |
Public Member Functions | |
TempoMap (framecnt_t frame_rate) | |
~TempoMap () | |
template<class T > | |
void | apply_with_metrics (T &obj, void(T::*method)(const Metrics &)) |
void | get_grid (BBTPointList::const_iterator &, BBTPointList::const_iterator &, framepos_t start, framepos_t end) |
void | bbt_time (framepos_t when, Timecode::BBT_Time &) |
void | bbt_time_rt (framepos_t when, Timecode::BBT_Time &) |
framepos_t | frame_time (const Timecode::BBT_Time &) |
framecnt_t | bbt_duration_at (framepos_t, const Timecode::BBT_Time &, int dir) |
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 |
const Tempo & | tempo_at (framepos_t) const |
const Meter & | meter_at (framepos_t) const |
const TempoSection & | tempo_section_at (framepos_t) const |
const MeterSection & | meter_section_at (framepos_t) const |
void | add_tempo (const Tempo &, Timecode::BBT_Time where) |
void | add_meter (const Meter &, Timecode::BBT_Time where) |
void | remove_tempo (const TempoSection &, bool send_signal) |
void | remove_meter (const MeterSection &, bool send_signal) |
void | replace_tempo (const TempoSection &, const Tempo &, const Timecode::BBT_Time &where) |
void | replace_meter (const MeterSection &, const Meter &, const Timecode::BBT_Time &where) |
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 (std::ostream &) const |
void | clear () |
TempoMetric | metric_at (Timecode::BBT_Time bbt) const |
TempoMetric | metric_at (framepos_t, Metrics::const_iterator *last=NULL) const |
Metrics::const_iterator | 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 | cut_time (framepos_t where, framecnt_t amount) |
int | n_tempos () const |
int | n_meters () const |
framecnt_t | frame_rate () const |
Public Member Functions inherited from PBD::Stateful | |
Stateful () | |
virtual | ~Stateful () |
virtual bool | apply_changes (PropertyBase const &) |
PropertyChange | apply_changes (PropertyList const &) |
const OwnedPropertyList & | properties () const |
void | add_property (PropertyBase &s) |
void | add_extra_xml (XMLNode &) |
XMLNode * | extra_xml (const std::string &str, bool add_if_missing=false) |
void | save_extra_xml (const XMLNode &) |
const PBD::ID & | id () const |
bool | set_id (const XMLNode &) |
void | set_id (const std::string &) |
void | reset_id () |
void | clear_changes () |
virtual void | clear_owned_changes () |
PropertyList * | get_changes_as_properties (Command *) const |
virtual void | rdiff (std::vector< Command * > &) const |
bool | changed () const |
virtual PropertyList * | property_factory (const XMLNode &) const |
virtual void | suspend_property_changes () |
virtual void | resume_property_changes () |
bool | property_changes_suspended () const |
Public Member Functions inherited from PBD::Destructible | |
Destructible () | |
virtual | ~Destructible () |
void | drop_references () |
Static Public Member Functions | |
static const Tempo & | default_tempo () |
static const Meter & | default_meter () |
Private Member Functions | |
void | recompute_map (bool reassign_tempo_bbt, framepos_t end=-1) |
void | extend_map (framepos_t end) |
void | require_map_to (framepos_t pos) |
void | require_map_to (const Timecode::BBT_Time &) |
void | _extend_map (TempoSection *tempo, MeterSection *meter, Metrics::iterator next_metric, Timecode::BBT_Time current, framepos_t current_frame, framepos_t end) |
BBTPointList::const_iterator | bbt_before_or_at (framepos_t) |
BBTPointList::const_iterator | bbt_before_or_at (const Timecode::BBT_Time &) |
BBTPointList::const_iterator | bbt_after_or_at (framepos_t) |
framepos_t | round_to_type (framepos_t fr, RoundMode dir, BBTPointType) |
void | bbt_time (framepos_t, Timecode::BBT_Time &, const BBTPointList::const_iterator &) |
framecnt_t | bbt_duration_at_unlocked (const Timecode::BBT_Time &when, const Timecode::BBT_Time &bbt, int dir) |
const MeterSection & | first_meter () const |
MeterSection & | first_meter () |
const TempoSection & | first_tempo () const |
TempoSection & | first_tempo () |
void | do_insert (MetricSection *section) |
void | add_tempo_locked (const Tempo &, Timecode::BBT_Time where, bool recompute) |
void | add_meter_locked (const Meter &, Timecode::BBT_Time where, bool recompute) |
bool | remove_tempo_locked (const TempoSection &) |
bool | remove_meter_locked (const MeterSection &) |
Private Attributes | |
Metrics | metrics |
framecnt_t | _frame_rate |
Glib::Threads::RWLock | lock |
BBTPointList | _map |
Static Private Attributes | |
static Tempo | _default_tempo |
static Meter | _default_meter |
Friends | |
class | ::BBTTest |
class | ::FrameposPlusBeatsTest |
class | ::TempoTest |
Additional Inherited Members | |
Public Attributes inherited from PBD::Stateful | |
PBD::Signal1< void, const PropertyChange & > | PropertyChanged |
Public Attributes inherited from PBD::Destructible | |
PBD::Signal0< void > | Destroyed |
PBD::Signal0< void > | DropReferences |
Static Public Attributes inherited from PBD::Stateful | |
static int | current_state_version = 0 |
static int | loading_state_version = 0 |
Protected Member Functions inherited from PBD::Stateful | |
void | add_instant_xml (XMLNode &, const std::string &directory_path) |
XMLNode * | instant_xml (const std::string &str, const std::string &directory_path) |
void | add_properties (XMLNode &) |
PropertyChange | set_values (XMLNode const &) |
virtual void | post_set (const PropertyChange &) |
virtual void | send_change (const PropertyChange &) |
virtual void | mid_thaw (const PropertyChange &) |
Protected Attributes inherited from PBD::Stateful | |
XMLNode * | _extra_xml |
XMLNode * | _instant_xml |
PBD::PropertyChange | _pending_changed |
Glib::Threads::Mutex | _lock |
std::string | _xml_node_name |
name of node to use for this object in XML More... | |
OwnedPropertyList * | _properties |
typedef std::vector<BBTPoint> ARDOUR::TempoMap::BBTPointList |
TempoMap::TempoMap | ( | framecnt_t | frame_rate | ) |
|
private |
void TempoMap::add_meter | ( | const Meter & | meter, |
Timecode::BBT_Time | where | ||
) |
|
private |
void TempoMap::add_tempo | ( | const Tempo & | tempo, |
Timecode::BBT_Time | where | ||
) |
|
private |
|
inline |
|
private |
|
private |
|
private |
framecnt_t TempoMap::bbt_duration_at | ( | framepos_t | pos, |
const Timecode::BBT_Time & | bbt, | ||
int | dir | ||
) |
|
private |
void TempoMap::bbt_time | ( | framepos_t | when, |
Timecode::BBT_Time & | bbt | ||
) |
|
private |
void TempoMap::bbt_time_rt | ( | framepos_t | when, |
Timecode::BBT_Time & | bbt | ||
) |
void TempoMap::change_existing_tempo_at | ( | framepos_t | where, |
double | bpm, | ||
double | note_type | ||
) |
void TempoMap::change_initial_tempo | ( | double | bpm, |
double | note_type | ||
) |
void ARDOUR::TempoMap::clear | ( | ) |
bool TempoMap::cut_time | ( | framepos_t | where, |
framecnt_t | amount | ||
) |
|
inlinestatic |
|
inlinestatic |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
inline |
framepos_t TempoMap::frame_time | ( | const Timecode::BBT_Time & | bbt | ) |
framepos_t TempoMap::framepos_minus_beats | ( | framepos_t | pos, |
Evoral::Beats | beats | ||
) | const |
framepos_t TempoMap::framepos_plus_bbt | ( | framepos_t | pos, |
Timecode::BBT_Time | b | ||
) | const |
framepos_t TempoMap::framepos_plus_beats | ( | framepos_t | pos, |
Evoral::Beats | beats | ||
) | const |
Evoral::Beats TempoMap::framewalk_to_beats | ( | framepos_t | pos, |
framecnt_t | distance | ||
) | const |
void TempoMap::get_grid | ( | BBTPointList::const_iterator & | , |
BBTPointList::const_iterator & | , | ||
framepos_t | start, | ||
framepos_t | end | ||
) |
|
virtual |
Implements PBD::Stateful.
void TempoMap::insert_time | ( | framepos_t | where, |
framecnt_t | amount | ||
) |
const Meter & TempoMap::meter_at | ( | framepos_t | frame | ) | const |
const MeterSection & TempoMap::meter_section_at | ( | framepos_t | frame | ) | const |
TempoMetric TempoMap::metric_at | ( | Timecode::BBT_Time | bbt | ) | const |
TempoMetric TempoMap::metric_at | ( | framepos_t | frame, |
Metrics::const_iterator * | last = NULL |
||
) | const |
Return the TempoMetric at frame t
, and point last
to the latest metric change <= t, if it is non-NULL.
|
inline |
|
private |
void TempoMap::remove_meter | ( | const MeterSection & | tempo, |
bool | send_signal | ||
) |
|
private |
void TempoMap::remove_tempo | ( | const TempoSection & | tempo, |
bool | send_signal | ||
) |
|
private |
void TempoMap::replace_meter | ( | const MeterSection & | ms, |
const Meter & | meter, | ||
const Timecode::BBT_Time & | where | ||
) |
void TempoMap::replace_tempo | ( | const TempoSection & | ts, |
const Tempo & | tempo, | ||
const Timecode::BBT_Time & | where | ||
) |
|
private |
|
private |
framepos_t TempoMap::round_to_bar | ( | framepos_t | frame, |
RoundMode | dir | ||
) |
framepos_t TempoMap::round_to_beat | ( | framepos_t | frame, |
RoundMode | dir | ||
) |
framepos_t TempoMap::round_to_beat_subdivision | ( | framepos_t | fr, |
int | sub_num, | ||
RoundMode | dir | ||
) |
|
private |
void ARDOUR::TempoMap::set_length | ( | framepos_t | frames | ) |
|
virtual |
Implements PBD::Stateful.
const Tempo & TempoMap::tempo_at | ( | framepos_t | frame | ) | const |
const TempoSection & TempoMap::tempo_section_at | ( | framepos_t | frame | ) | const |
|
friend |
|
private |
|
private |