NoteEventID's || Overlapping notes fix...
-
I have Keys triggering chords, there are some instances where multiple chords share the same notes that interferes with noteOffs and I get stuck notes. Is it possible to create unique 'noteEventIds' arrays per chord trigger script and give them unique eventID's that wont interfere with one another?
Do I just create differnt arrays and they will get non-conflicting id's?
Is this a thing?const var noteEventIds1 = []; const var noteEventids2 = [];
Am I doing too much? What is best practice in this situation?
-
@Chazrox more or less yes - use Event IDs for the notes in each chord and keep them in a couple of arrays
-
@Lindon if I then send both event id arrays down the pipe, do they converge into one event list w/ unique id's even if they share the same note sometimes (if the 2 chords overlap)? The reason im asking is... would I have to deal with the noteOffs per array? or do they converge and are deal with as one?
Im still trying to learn about midi events/messages so its fair to assume I know little to none about this thus far.
-
@Chazrox said in NoteEventID's || Overlapping notes fix...:
@Lindon if I then send both event id arrays down the pipe, do they converge into one event list w/ unique id's even if they share the same note sometimes (if the 2 chords overlap)?
I have no idea what you mean by "converge" they are two separate arrays. I dont know what you mean by "send..down the pipe" they live where they live(scope).
Assuming you want any chord to play when its key switch is down and stop when its up (so any number of keyswitched chords can be playing at the same time):
just have an array for each keyswitch:
on note off for the KS issue note off messages for the IDs in its array
on note on - fill this KS's array with event IDs for the chord...if you only want one chord to play at a time: use one chordArray
on any KS off: check if any other KS is down if so do nothing, else issue note off for the event IDs in chordArray
on any KS on: issue note off for the event IDs in chordArray, clear the chordArray, then fill the array with the IDs from playNote for each chord note...
-
@Lindon Thank You! Im gonna try that right now. Im sure that will be the fix! Great explaination. Thanks again
excuse my slang...like I said. Just assume I know nothing for the time being. lol.
-
@Lindon got it! Thank you sir!
-
C Chazrox marked this topic as a question
-
C Chazrox has marked this topic as solved