Randomly activate a fixed number of toggles, deactivate the others
Hi!
I have an arbitrary number of toggles, say 10, and a process that sends periodically a bang.
I want that at each bang received, a fixed number of randomly chosen toggles is activated and the others are deactivated. The idea is that these toggles are connected to bypass on/off separate effects in Jitter, so that at each bang a different combination of effects is activated.
Ideally I would like to have:
The number of toggles to activate configurable (eg 2, 3, etc).
Avoid to repeat combinations in sequence like having combination (1, 2) and at the next bang again combination (1, 2).
Any suggestions on how this could be done?
I found this on forums a while back- maybe you can modify to your needs
uzi -> urn -> cycle -> ...
My first attempt using your suggestions. I am not sure why but the indices of the random list don't correspond at what cycle outputs.
Do you think it is possible to not deactivate a toggle if the new generated list contains it? Right now I am always deactivating all toggles before apply the new list.
cant look a the patch atm.
resetting everything to zero before every new task - is a common and good practice.
try adding iter -> sel after [t l b]
also - urn-jb to avoid repetitions which is causing all toggles off
Very clever solution , thank you!
The only thing I miss here is to avoid to bang 0 to every toggle. Basically I need to make a set difference between the current random combination, say (1, 3), and the whole set (1, 2, 3, 4, 5) which would give (2, 4, 5) and bang 0 only to these.