From 0c13d4da751acca06981ebdad956ced97142c178 Mon Sep 17 00:00:00 2001 From: Oliver Parczyk Date: Sat, 16 Dec 2023 11:55:02 +0100 Subject: [PATCH] Fix constantly playing note out of range --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 20976f8..0d8741a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -121,6 +121,12 @@ void loop() { uint8_t value; for (uint8_t i = 0; i < KEY_PINS; i++) { + // due to the circuitry, there is one phantom note above + // the highest key constantly 'playing' + // but we don't need to scan that far anyway + if (active_key_group == KEY_GROUP_NUM-1 && i>0){ + break; + } value = digitalReadFast(key_pins[i]); // If the key is pressed, we send a MIDI message and set the entry in the array // ! inverted