From 7bba7bcf25abc646eb7f47b8bc7498547b6146b0 Mon Sep 17 00:00:00 2001 From: Johan Berglund Date: Sat, 23 Sep 2017 09:50:00 +0200 Subject: [PATCH] Just forgot a thing for the slurred note velocity. --- NuEVI.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NuEVI.ino b/NuEVI.ino index 6eb7b5e..019bdc8 100644 --- a/NuEVI.ino +++ b/NuEVI.ino @@ -686,9 +686,10 @@ void loop() { if (noteValueCheck(fingeredNote) != activeNote) { // Player has moved to a new fingering while still blowing. // Send a note off for the current note and a note on for - // the new note. - velocitySend = map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,7,127); // set new velocity value based on current pressure sensor level - + // the new note. + if (!velocity){ + velocitySend = map(constrain(pressureSensor,breathThrVal,breathMaxVal),breathThrVal,breathMaxVal,7,127); // set new velocity value based on current pressure sensor level + } activeNote=noteValueCheck(activeNote); if (parallelChord || subOctaveDouble){ // poly playing, send old note off before new note on usbMIDI.sendNoteOff(activeNote, velocitySend, activeMIDIchannel); // send Note Off message for old note