I have a patch that receives an ID number when an object is added on a physcial table, and receives the ID number of an object when it is removed (from the table).
All add IDs come through the same outlet, and all the remove IDs come out another outlet.
Is there a way I can sort or list out what IDs are currently active or save the numbers received through the add or remove outlets? Since the ID numbers aren't received in a single list or message (but one after the other) how can I keep track of them when they come out the same outlet?
For example, the add outlet may receive a 1, then a 2, then a 3, then a 4 and then the remove outlet may receive a 3. This means only 1, 2, and 4 are still active.
One thought I had was creating a
all add objects, but is there a way to remove things from a list if they match what is inside? For example, if a 1 is in the add list, and the remove ID outlet receives a 1, it'll remove the number "1" from the add list.