_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());
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);
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();
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();
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)
{