FIFO Queue for entire lists?
Hello, I'm looking for an object to store entire lists in a first-in-first-out structure. zl.queue only stores single values.
The problem I'm trying to solve is this: in a real-time MIDI patch, when I add a second voice with some kind of randomness in the pitch, I need a way to keep track of the connection between my initial pitch and the random part so that the latter receives its note-off.
All I found in the forums is a dead link to some javascript that does just that. So I appreciate any input. I try to avoid reinventing the wheel, although I certainly could do so.
best regards,
Christoph
Edit: It seems that what I really need is a dict or hash table which allows to use ints as keys. Just implementing it in JS.
Here's a queue for lists using coll that might help.
Thanks for this!
For a similar problem I'm using [table] to store the changed pitch of note-on and recall it at the corresponding note-off.