getting random radiogroup settings, but none of the same

Aug 11, 2011 at 6:46pm

getting random radiogroup settings, but none of the same

I am trying to send random numbers from (1-9)to nine different radiogroup objects, but even though I want it to be random I still dont want any radiogroup setting to happen more than once – In otherwords I want to randomize where each parameters lands, but have no paramter controlled by more than one control input

– Pasted Max Patch, click to expand. –

Best regards.

#58430
Aug 11, 2011 at 7:12pm

urn is your friend here

– Pasted Max Patch, click to expand. –
#210000
Aug 11, 2011 at 7:14pm

I can’t view the example patch right now but a quick solution would be uzi 9, urn, thresh, then unpack to each radiogroup. Urn is the main object you want as it does random numbers without repetition. There is probably a better way to handle the routing than using thresh and unpack. The uzi’s “done” output can be used to reset the urn object.

edit: now that I think of it I believe urn has it’s own output to reset itself.

#210001
Aug 11, 2011 at 7:14pm

Awsome. Thanks :)

#210002
Aug 11, 2011 at 9:10pm

Something that might be interesting: since it’s permutations you’re interested in, check out the mxj list package. If you use permutations instead of randomly generating a list, you can always go back to something that was interesting, and you can explore various patterns that are similar. (try using drunk to traverse the permutation index) Just cache the previous value(s) of the permutation index in a coll and you now have a history!

– Pasted Max Patch, click to expand. –
#210003
Aug 11, 2011 at 9:41pm

I’ve used urn in a similar fashion. If you seed urn externally, you can save an reload that seed if there’s something interesting. Here’s an example of a random counter that uses this idea:

– Pasted Max Patch, click to expand. –
#210004

You must be logged in to reply to this topic.