Hello, I'm new to PD, and I'm working on creating a semi-random pitch generator. The goal is that any combination of pitches can be selected, and PD will randomly pick from that list of selected pitches.
I currently have toggles representing each note, with the midi note number set to each toggle's respective non-zero value. From there, I'm hoping to get the selected values compiled into a list so that I can use [list-nth] to select a value from a random position within the list.
My trouble is in dealing with [pack]'s inherent hot and cold inlets. I'm looking for a way to deselect a note and have that value removed from the list immediately, without relying on a change to the hot inlet, and without having that value stored in the cold inlet. Is there an object, combination of objects, or a different way to use [pack] which can simply take individual numbers and compile them in a list, with a change to any number taking immediate effect? Or is there a more intuitive way to approach this project (keeping in mind that any deselected notes must be removed from the list, not substituted with 0 - I'm using [list-filter] to remove the 0s).
Thank you for any and all advice