From 885b03df6b19c456ce6fe7963abd4069262d59eb Mon Sep 17 00:00:00 2001 From: jxzhe Date: Fri, 31 Mar 2023 21:33:59 +0800 Subject: [PATCH] Release all notes & pedals before slider change --- globals.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/globals.js b/globals.js index f6dff75..3eef67f 100644 --- a/globals.js +++ b/globals.js @@ -64,6 +64,10 @@ WebMidi.enable(function (err) { //check if WebMidi.js is enabled }); function inputChanged() { + isKeyOn.fill(0); + controllerChange(64, 0); + controllerChange(67, 0); + midiIn.removeListener(); midiIn = WebMidi.inputs[midiSelectSlider.value()]; midiIn.addListener('noteon', "all", function (e) {