I am trying to make a system for dynamically creating modulators for a synth, so far I have it so that each time "LFO" is selected from a popup, a new one is created, with an argument one bigger than the last, (arg used to send~ $1-LFO etc). The problem comes when I have deleted an LFO, and create another one, it keeps adding to the last number, not "filling the gap" for instance:
when i have in existence:
the next LFO created is "LFO 5", not "LFO 3". It works fine if you remove the last LFO from the patch.
I am currently exploring list management but it is quite complicated. I feel it's so close but just out of reach.
I would also like to find a way to delete these LFO objects dynamically instead of entering edit mode.
the closest I have come is:
[find LFO, cut(
but it seems to cut each object (even messages) containing the symbol "LFO", and I cannot seem to "point" it to the one I want to delete!
In both cases, I'm sure im over complicating, but have learnt enough in my own process of exploration now and need some guidance!
patch attached, with LFO included Modulator w LFO included.zip