aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDevine Lu Linvega <[email protected]>2020-09-22 14:12:01 -0700
committerGitHub <[email protected]>2020-09-22 14:12:01 -0700
commitd082282681e1fc6610950bac274251f5f4314745 (patch)
tree15331fd84e5b7e7b71d64bc0191e59139b9760f0
parentcb672d6af5f588e448c1e8853289721d36e4623e (diff)
parent92add198e51cf3fff9e2b3a91138107064b5d556 (diff)
downloadOrca-d082282681e1fc6610950bac274251f5f4314745.tar.gz
Orca-d082282681e1fc6610950bac274251f5f4314745.zip
Merge pull request #236 from smrq/master
Trigger noteon for zero-length MIDI notes
-rw-r--r--desktop/sources/scripts/core/io/midi.js10
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--
}
}