Skip to content

Commit 1edead1

Browse files
committed
Really correct octave
Signed-off-by: falkTX <[email protected]>
1 parent bab148c commit 1edead1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/Cardinal/src/AudioToCVPitch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ struct AudioToCVPitch : Module {
120120

121121
if (detectedPitchInHz > 0.f && pitchConfidence >= params[PARAM_CONFIDENCETHRESHOLD].getValue() * 0.01f)
122122
{
123-
const float linearPitch = 12.f * (log2f(detectedPitchInHz / 440.f) + octave - 6) + 69.f;
123+
const float linearPitch = 12.f * (log2f(detectedPitchInHz / 440.f) + octave - 5) + 69.f;
124124
cvPitch = std::max(-10.f, std::min(10.f, linearPitch * (1.f/12.f)));
125125
lastKnownPitchInHz = detectedPitchInHz;
126126
cvSignal = 10.f;

0 commit comments

Comments
 (0)