From 8d6e928612423303c0f36e791a32b56aae144b4a Mon Sep 17 00:00:00 2001 From: Joe Bowbeer Date: Mon, 17 Apr 2017 21:51:40 -0700 Subject: [PATCH] Turn off previous note when stop playing I've noticed occasional stuck notes using this example. This change seems to fix the problem. The problem, I suspect, happens when the *on* thumb is released at the same time as there are other fingering changes, in which case this sketch would turn off the note corresponding to the new fingering instead of turning off the note that was previously turned on, resulting in a stuck note. --- examples/E03_MIDI/E03_MIDI.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/E03_MIDI/E03_MIDI.ino b/examples/E03_MIDI/E03_MIDI.ino index 4d020fc..53f769a 100644 --- a/examples/E03_MIDI/E03_MIDI.ino +++ b/examples/E03_MIDI/E03_MIDI.ino @@ -90,7 +90,7 @@ void loop(){ } }else{ if (playing){ - MIDI.sendNoteOff(OpenPipe.note,0,1); // Stop the note + MIDI.sendNoteOff(previous_note,0,1); // Stop the note playing = false; } }