Release all notes & pedals before slider change

This commit is contained in:
jxzhe
2023-03-31 21:33:59 +08:00
parent 30ea017682
commit 885b03df6b

View File

@@ -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) {