mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-08 06:35:46 +01:00
Tempo ramps - rename, more legacy session handling.
This commit is contained in:
parent
975d4af486
commit
25ebedab3b
2 changed files with 6 additions and 6 deletions
|
|
@ -193,6 +193,9 @@ class LIBARDOUR_API TempoSection : public MetricSection, public Tempo {
|
|||
void set_type (Type type);
|
||||
Type type () const { return _type; }
|
||||
|
||||
double c_func () const { return _c_func; }
|
||||
void set_c_func (double c_func) { _c_func = c_func; }
|
||||
|
||||
double tempo_at_frame (const framepos_t& frame, const framecnt_t& frame_rate) const;
|
||||
framepos_t frame_at_tempo (const double& ppm, const double& beat, const framecnt_t& frame_rate) const;
|
||||
|
||||
|
|
@ -205,9 +208,6 @@ class LIBARDOUR_API TempoSection : public MetricSection, public Tempo {
|
|||
double compute_c_func_pulse (const double& end_bpm, const double& end_pulse, const framecnt_t& frame_rate);
|
||||
double compute_c_func_frame (const double& end_bpm, const framepos_t& end_frame, const framecnt_t& frame_rate) const;
|
||||
|
||||
double get_c_func () const { return _c_func; }
|
||||
void set_c_func (double c_func) { _c_func = c_func; }
|
||||
|
||||
Timecode::BBT_Time legacy_bbt () { return _legacy_bbt; }
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -2608,7 +2608,7 @@ TempoMap::get_grid (vector<TempoMap::BBTPoint>& points,
|
|||
const TempoSection tempo = tempo_section_at_locked (pos);
|
||||
const MeterSection meter = meter_section_at_locked (pos);
|
||||
const BBT_Time bbt = beats_to_bbt (cnt);
|
||||
points.push_back (BBTPoint (meter, tempo_at_locked (pos), pos, bbt.bars, bbt.beats, tempo.get_c_func()));
|
||||
points.push_back (BBTPoint (meter, tempo_at_locked (pos), pos, bbt.bars, bbt.beats, tempo.c_func()));
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
|
|
@ -2862,12 +2862,12 @@ TempoMap::set_state (const XMLNode& node, int /*version*/)
|
|||
}
|
||||
if (prev_m && prev_m->pulse() < 0.0) {
|
||||
/*XX we cannot possibly make this work??. */
|
||||
pair<double, BBT_Time> start = make_pair (((m->bbt().bars - 1) * m->note_divisor())
|
||||
pair<double, BBT_Time> start = make_pair (((m->bbt().bars - 1) * prev_m->note_divisor())
|
||||
+ (m->bbt().beats - 1)
|
||||
+ (m->bbt().ticks / BBT_Time::ticks_per_beat)
|
||||
, m->bbt());
|
||||
m->set_beat (start);
|
||||
const double start_beat = ((m->bbt().bars - 1) * m->note_divisor())
|
||||
const double start_beat = ((m->bbt().bars - 1) * prev_m->note_divisor())
|
||||
+ (m->bbt().beats - 1)
|
||||
+ (m->bbt().ticks / BBT_Time::ticks_per_beat);
|
||||
m->set_pulse (start_beat / prev_m->note_divisor());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue