mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
Tempo ramps - fix various tempo dragging issues.
This commit is contained in:
parent
6f3ac9d626
commit
3c76fa9dd1
3 changed files with 26 additions and 4 deletions
|
|
@ -3206,7 +3206,6 @@ MeterMarkerDrag::motion (GdkEvent* event, bool first_move)
|
|||
_editor->session()->tempo_map().gui_dilate_tempo (_real_section, pf);
|
||||
} else if (bbt.bars > _real_section->bbt().bars) {
|
||||
const double pulse = _real_section->pulse() + (prev_m.note_divisor() / prev_m.divisions_per_bar());
|
||||
//const double pulse = _real_section->pulse() + (_real_section->note_divisor() / _real_section->divisions_per_bar());
|
||||
_editor->session()->tempo_map().gui_move_meter (_real_section, pulse);
|
||||
} else if (bbt.bars < _real_section->bbt().bars) {
|
||||
const double pulse = _real_section->pulse() - (prev_m.note_divisor() / prev_m.divisions_per_bar());
|
||||
|
|
|
|||
|
|
@ -393,7 +393,8 @@ class LIBARDOUR_API TempoMap : public PBD::StatefulDestructible
|
|||
void replace_tempo (const TempoSection&, const Tempo&, const framepos_t& frame, TempoSection::Type type);
|
||||
|
||||
void gui_move_tempo_frame (TempoSection*, const framepos_t& frame);
|
||||
void gui_move_tempo_beat (TempoSection*, const double& frame);
|
||||
void gui_move_tempo_beat (TempoSection*, const double& beat);
|
||||
void gui_move_tempo_pulse (TempoSection*, const double& pulse);
|
||||
void gui_move_meter (MeterSection*, const framepos_t& frame);
|
||||
void gui_move_meter (MeterSection*, const double& pulse);
|
||||
bool gui_change_tempo (TempoSection*, const Tempo& bpm);
|
||||
|
|
|
|||
|
|
@ -2400,7 +2400,7 @@ TempoMap::predict_tempo_frame (TempoSection* section, const BBT_Time& bbt)
|
|||
if (solve_map (future_map, tempo_copy, pulse_at_beat_locked (future_map, beat))) {
|
||||
ret = tempo_copy->frame();
|
||||
} else {
|
||||
ret = frame_at_beat_locked (_metrics, beat);
|
||||
ret = section->frame();
|
||||
}
|
||||
|
||||
Metrics::const_iterator d = future_map.begin();
|
||||
|
|
@ -2422,7 +2422,7 @@ TempoMap::predict_tempo_pulse (TempoSection* section, const framepos_t& frame)
|
|||
if (solve_map (future_map, tempo_copy, frame)) {
|
||||
ret = tempo_copy->pulse();
|
||||
} else {
|
||||
ret = pulse_at_frame_locked (_metrics, frame);
|
||||
ret = section->pulse();
|
||||
}
|
||||
|
||||
Metrics::const_iterator d = future_map.begin();
|
||||
|
|
@ -2477,6 +2477,28 @@ TempoMap::gui_move_tempo_beat (TempoSection* ts, const double& beat)
|
|||
MetricPositionChanged (); // Emit Signal
|
||||
}
|
||||
|
||||
void
|
||||
TempoMap::gui_move_tempo_pulse (TempoSection* ts, const double& pulse)
|
||||
{
|
||||
Metrics future_map;
|
||||
{
|
||||
Glib::Threads::RWLock::WriterLock lm (lock);
|
||||
TempoSection* tempo_copy = copy_metrics_and_point (_metrics, future_map, ts);
|
||||
if (solve_map (future_map, tempo_copy, pulse)) {
|
||||
solve_map (_metrics, ts, pulse);
|
||||
recompute_meters (_metrics);
|
||||
}
|
||||
}
|
||||
|
||||
Metrics::const_iterator d = future_map.begin();
|
||||
while (d != future_map.end()) {
|
||||
delete (*d);
|
||||
++d;
|
||||
}
|
||||
|
||||
MetricPositionChanged (); // Emit Signal
|
||||
}
|
||||
|
||||
void
|
||||
TempoMap::gui_move_meter (MeterSection* ms, const framepos_t& frame)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue