diff options
-rw-r--r-- | desktop/sources/scripts/core/io/midi.js | 10 |
1 files 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-- } } |