diff options
author | Robin Gareus <robin@gareus.org> | 2016-05-26 10:44:13 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-05-26 10:44:13 +0200 |
commit | eadc2ca88a754ac5e7ba960b2db4c01cc40d887a (patch) | |
tree | 3fa593e2087aec1ee2c0b06837f44481ff3a064b | |
parent | 602344f0c5cfd97b01c900252c01514457df1c7f (diff) |
fix maths thinko
-rw-r--r-- | libs/ardour/audio_unit.cc | 6 | ||||
-rw-r--r-- | libs/ardour/session_vst.cc | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libs/ardour/audio_unit.cc b/libs/ardour/audio_unit.cc index 37c96a30ca..15b63c8f37 100644 --- a/libs/ardour/audio_unit.cc +++ b/libs/ardour/audio_unit.cc @@ -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) { diff --git a/libs/ardour/session_vst.cc b/libs/ardour/session_vst.cc index 23cf0f8b00..21875ece46 100644 --- a/libs/ardour/session_vst.cc +++ b/libs/ardour/session_vst.cc @@ -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; } |