From 92add198e51cf3fff9e2b3a91138107064b5d556 Mon Sep 17 00:00:00 2001 From: Greg Smith Date: Tue, 22 Sep 2020 14:29:57 -0500 Subject: Trigger noteon for zero-length MIDI notes --- desktop/sources/scripts/core/io/midi.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/desktop/sources/scripts/core/io/midi.js b/desktop/sources/scripts/core/io/midi.js index 5fda0ae..d5fb1d7 100644 --- a/desktop/sources/scripts/core/io/midi.js +++ b/desktop/sources/scripts/core/io/midi.js @@ -25,14 +25,14 @@ function Midi (client) { this.run = function () { for (const id in this.stack) { const item = this.stack[id] + if (item.isPlayed === false) { + this.press(item) + } if (item.length < 1) { this.release(item, id) + } else { + item.length-- } - if (!this.stack[id]) { continue } - if (this.stack[id].isPlayed === false) { - this.press(this.stack[id]) - } - this.stack[id].length-- } } -- cgit v1.2.3