From 34f565a96c35fbbf61d4c9d9be61a7e8495c3439 Mon Sep 17 00:00:00 2001 From: michalcourson Date: Wed, 3 Dec 2025 18:25:13 -0500 Subject: [PATCH] closes #5 - rounding vs truncation error --- Source/Shifter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Shifter.h b/Source/Shifter.h index 8a22aa7..5dcd871 100644 --- a/Source/Shifter.h +++ b/Source/Shifter.h @@ -101,7 +101,7 @@ public: } float update(float Pdet, int Ptarget) { // Detect large jump (new note) - float diff = Pdet - (int)Pdet; + float diff = Pdet - (int)(Pdet+.5); if (Ptarget != PtargPrev) { // Immediately reset to new note