mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-06 05:35:47 +01:00
Tempo ramps - before the first meter, the beat is 0.0
This commit is contained in:
parent
4820a11180
commit
94e7e4e53b
1 changed files with 3 additions and 0 deletions
|
|
@ -1542,6 +1542,9 @@ TempoMap::beat_at_frame_locked (const Metrics& metrics, const framecnt_t& frame)
|
|||
{
|
||||
const MeterSection& prev_m = meter_section_at_locked (metrics, frame);
|
||||
const TempoSection& ts = tempo_section_at_locked (metrics, frame);
|
||||
if (frame < prev_m.frame()) {
|
||||
return 0.0;
|
||||
}
|
||||
return prev_m.beat() + (ts.pulse_at_frame (frame, _frame_rate) - prev_m.pulse()) * prev_m.note_divisor();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue