Fix constantly playing note out of range

This commit is contained in:
Oliver Parczyk 2023-12-16 11:55:02 +01:00
parent 030f2a39ae
commit 0c13d4da75

View File

@ -121,6 +121,12 @@ void loop() {
uint8_t value; uint8_t value;
for (uint8_t i = 0; i < KEY_PINS; i++) { 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]); value = digitalReadFast(key_pins[i]);
// If the key is pressed, we send a MIDI message and set the entry in the array // If the key is pressed, we send a MIDI message and set the entry in the array
// ! inverted // ! inverted