From 67a5a42181a6b3ca9d5f911b772f40776777afca Mon Sep 17 00:00:00 2001 From: Yinan Zhou Date: Tue, 3 Dec 2024 15:55:15 -0500 Subject: [PATCH] fix: update octave change in `AdjustPitchForNewClef` refs: https://github.com/DDMAL/Neon/issues/1248#issuecomment-2513344698 --- src/pitchinterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pitchinterface.cpp b/src/pitchinterface.cpp index 893e928d57d..e7d08596f53 100644 --- a/src/pitchinterface.cpp +++ b/src/pitchinterface.cpp @@ -109,13 +109,13 @@ void PitchInterface::AdjustPitchForNewClef(const Clef *oldClef, const Clef *newC int pitchDiff = -2 * (newClef->GetLine() - oldClef->GetLine()); if (oldClef->GetShape() == CLEFSHAPE_F) { - pitchDiff -= 3; + pitchDiff += 4; } else if (oldClef->GetShape() == CLEFSHAPE_G) { pitchDiff -= 4; } if (newClef->GetShape() == CLEFSHAPE_F) { - pitchDiff += 3; + pitchDiff -= 4; } else if (newClef->GetShape() == CLEFSHAPE_G) { pitchDiff += 4;