Skip to content

Commit

Permalink
Correct default octave
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed May 1, 2022
1 parent 2ae7009 commit bab148c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/Cardinal/src/AudioToCVPitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ struct AudioToCVPitch : Module {

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

0 comments on commit bab148c

Please sign in to comment.