mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-24 23:47:39 +01:00
fix maths thinko
This commit is contained in:
parent
602344f0c5
commit
eadc2ca88a
2 changed files with 4 additions and 3 deletions
|
|
@ -1767,10 +1767,10 @@ AUPlugin::get_beat_and_tempo_callback (Float64* outCurrentBeat,
|
|||
if (outCurrentBeat) {
|
||||
const double ppq_scaling = metric.meter().note_divisor() / 4.0;
|
||||
float beat;
|
||||
beat = metric.meter().divisions_per_bar() * (bbt.bars - 1) * ppq_scaling;
|
||||
beat += (bbt.beats - 1) * ppq_scaling;;
|
||||
beat = metric.meter().divisions_per_bar() * (bbt.bars - 1);
|
||||
beat += (bbt.beats - 1);
|
||||
beat += bbt.ticks / Timecode::BBT_Time::ticks_per_beat;
|
||||
*outCurrentBeat = beat;
|
||||
*outCurrentBeat = beat * ppq_scaling;
|
||||
}
|
||||
|
||||
if (outCurrentTempo) {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ vst_ppq (const TempoMetric& tm, const Timecode::BBT_Time& bbt, double& ppqBar)
|
|||
|
||||
ppqBar *= ppq_scaling;
|
||||
ppqBeat *= ppq_scaling;
|
||||
ppqTick *= ppq_scaling;
|
||||
|
||||
return ppqBar + ppqBeat + ppqTick;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue