I need to populate a list with the MIDI notes that are being pressed, and remove the note from the list when the key is released.
One idea is to use [notein], and if the velocity is> 0 then add the note to the list, and if the velocity == 0 then remove the note from the list. But I have no idea of how to implement this.
I think I need [list-extend], [list-find], and [list-delete], but I just can't figure out an implementation.
How can I do this?
EDIT: solved the problem and have a working patch. See my reply below for details.