projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4820a11
)
Tempo ramps - before the first meter, the beat is 0.0
author
nick_m
<mainsbridge@gmail.com>
Sat, 16 Apr 2016 18:26:19 +0000
(
04:26
+1000)
committer
nick_m
<mainsbridge@gmail.com>
Fri, 27 May 2016 13:38:15 +0000
(23:38 +1000)
libs/ardour/tempo.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/tempo.cc
b/libs/ardour/tempo.cc
index 978d4ed05a81a168eaafe5cbe08878b8e59656f4..7aa86d38b0ce7ea8d43bbc58ed858dd3391628a8 100644
(file)
--- a/
libs/ardour/tempo.cc
+++ b/
libs/ardour/tempo.cc
@@
-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();
}