Tempo ramps - add a gradient limit to the ramp, more comments.
- things are fine without this, but overall it feels slicker with a linit.
This commit is contained in:
parent
aad7b129b6
commit
73db86bf49
@ -394,7 +394,7 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
|
|||||||
|
|
||||||
/* TEMPO- AND METER-SENSITIVE FUNCTIONS
|
/* TEMPO- AND METER-SENSITIVE FUNCTIONS
|
||||||
|
|
||||||
bbt_time(), beat_at_frame(), frame_at_beat(), frame_time()
|
bbt_at_frame(), frame_at_bbt(), beat_at_frame(), frame_at_beat()
|
||||||
and bbt_duration_at()
|
and bbt_duration_at()
|
||||||
are all sensitive to tempo and meter, and will give answers
|
are all sensitive to tempo and meter, and will give answers
|
||||||
that align with the grid formed by tempo and meter sections.
|
that align with the grid formed by tempo and meter sections.
|
||||||
@ -445,12 +445,12 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
|
|||||||
framepos_t framepos_minus_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;
|
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_tempo (TempoSection*, const framepos_t& frame);
|
||||||
void gui_move_meter (MeterSection*, const framepos_t& frame);
|
void gui_move_meter (MeterSection*, const framepos_t& frame);
|
||||||
bool gui_change_tempo (TempoSection*, const Tempo& bpm);
|
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);
|
void gui_dilate_tempo (TempoSection* tempo, const framepos_t& frame, const framepos_t& end_frame, const double& pulse);
|
||||||
|
|
||||||
|
std::pair<double, framepos_t> predict_tempo_position (TempoSection* section, const Timecode::BBT_Time& bbt);
|
||||||
bool can_solve_bbt (TempoSection* section, const Timecode::BBT_Time& bbt);
|
bool can_solve_bbt (TempoSection* section, const Timecode::BBT_Time& bbt);
|
||||||
|
|
||||||
PBD::Signal0<void> MetricPositionChanged;
|
PBD::Signal0<void> MetricPositionChanged;
|
||||||
|
@ -1926,6 +1926,7 @@ TempoMap::check_solved (const Metrics& metrics) const
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (prev_t) {
|
if (prev_t) {
|
||||||
|
/* check ordering */
|
||||||
if ((t->frame() <= prev_t->frame()) || (t->pulse() <= prev_t->pulse())) {
|
if ((t->frame() <= prev_t->frame()) || (t->pulse() <= prev_t->pulse())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1936,6 +1937,14 @@ TempoMap::check_solved (const Metrics& metrics) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* gradient limit - who knows what it should be?
|
||||||
|
things are also ok (if a little chaotic) without this
|
||||||
|
*/
|
||||||
|
if (fabs (prev_t->c_func()) > 200.0) {
|
||||||
|
//std::cout << "c : " << prev_t->c_func() << std::endl;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
prev_t = t;
|
prev_t = t;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user