Tempo rmps - amend last commit, speeding up dragging of audio-locked meters quite a bit.
This commit is contained in:
parent
3f3ad715ef
commit
591a2026c0
@ -1397,10 +1397,12 @@ TempoMap::recompute_meters (Metrics& metrics)
|
||||
if (meter->position_lock_style() == AudioTime) {
|
||||
pair<double, BBT_Time> bt = make_pair (accumulated_beats, BBT_Time (accumulated_bars + 1, 1, 0));
|
||||
meter->set_beat (bt);
|
||||
meter->set_pulse (pulse_at_frame_locked (metrics, meter->frame()));
|
||||
} else {
|
||||
meter->set_frame (frame_at_pulse_locked (metrics, prev_m->pulse() + (meter->beat() - prev_m->beat()) / prev_m->note_divisor()));
|
||||
const double pulse = prev_m->pulse() + (meter->beat() - prev_m->beat()) / prev_m->note_divisor();
|
||||
meter->set_frame (frame_at_pulse_locked (metrics, pulse));
|
||||
meter->set_pulse (pulse);
|
||||
}
|
||||
meter->set_pulse (pulse_at_frame_locked (metrics, meter->frame()));
|
||||
prev_m = meter;
|
||||
}
|
||||
}
|
||||
@ -2112,12 +2114,14 @@ TempoMap::solve_map (Metrics& imaginary, MeterSection* section, const Meter& mt,
|
||||
}
|
||||
if (prev_ms) {
|
||||
if (m->position_lock_style() == MusicTime) {
|
||||
m->set_frame (frame_at_pulse_locked (imaginary, prev_ms->pulse() + (m->beat() - prev_ms->beat()) / prev_ms->note_divisor()));
|
||||
const double pulse = prev_ms->pulse() + (m->beat() - prev_ms->beat()) / prev_ms->note_divisor();
|
||||
m->set_frame (frame_at_pulse_locked (imaginary, pulse));
|
||||
m->set_pulse (pulse);
|
||||
} else {
|
||||
pair<double, BBT_Time> b_bbt = make_pair (accumulated_beats, BBT_Time (accumulated_bars + 1, 1, 0));
|
||||
m->set_beat (b_bbt);
|
||||
m->set_pulse (pulse_at_frame_locked (imaginary, m->frame()));
|
||||
}
|
||||
m->set_pulse (pulse_at_frame_locked (imaginary, m->frame()));
|
||||
}
|
||||
prev_ms = m;
|
||||
}
|
||||
@ -2165,12 +2169,14 @@ TempoMap::solve_map (Metrics& imaginary, MeterSection* section, const Meter& mt,
|
||||
}
|
||||
if (prev_ms) {
|
||||
if (m->position_lock_style() == MusicTime) {
|
||||
m->set_frame (frame_at_pulse_locked (imaginary, prev_ms->pulse() + (m->beat() - prev_ms->beat()) / prev_ms->note_divisor()));
|
||||
const double pulse = prev_ms->pulse() + (m->beat() - prev_ms->beat()) / prev_ms->note_divisor();
|
||||
m->set_frame (frame_at_pulse_locked (imaginary, pulse));
|
||||
m->set_pulse (pulse);
|
||||
} else {
|
||||
pair<double, BBT_Time> b_bbt = make_pair (accumulated_beats, BBT_Time (accumulated_bars + 1, 1, 0));
|
||||
m->set_beat (b_bbt);
|
||||
m->set_pulse (pulse_at_frame_locked (imaginary, m->frame()));
|
||||
}
|
||||
m->set_pulse (pulse_at_frame_locked (imaginary, m->frame()));
|
||||
}
|
||||
prev_ms = m;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user