Urn/Random sending multiple outputs

sitbh's icon

Hi there,

I'm a newbie to Max MSP and im having to learn it in 2 weeks for a project for my course.

One question i have is about Urn/Random.

So far, i have 8 Randoms creating random numbers between 1 and 8. I could end up with 1,2,3,4,5,6,7,8 or i could end up with 1,1,1,3,5,5,7,7.

I don't want duplicates, i would just like 1-8 to be represented in different random orders. I understand i could use Urn for this, but using 8 Urns instead of Random would still give me duplicates. Is there any way for Urn/Random to output 8 integers to my number boxes with no duplicates each time?

Thanks in advance! Hope someone can help :)

Gregory Taylor's icon

I think you need to take a more careful look at the urn object. You can do that with a single urn object, unless you haven't described what you want well. Since you appear to want a list, perhaps you should look at the zl object - particularly in its guise as the zl group object.

sitbh's icon

Greg,

Sorry if there's any confusion. It's hard to put my thoughts into words haha.

I basically require an Urn with 8 outputs. Each output would be attached to a number box. So each numberbox will display a number 1-8 respectively.

Gregory Taylor's icon

Um...

why don't you bang the urn object N times and then collect or distribute the bangs in whatever way you want? That's what I was getting at.

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

You need to find a way to distribute the output of urn to your various destinations. Here's one:

sitbh's icon

Chris - perfect. That's exactly what i was looking for. As a newbie, i'm still getting to grips with this kind of thing. My project is involving the playback of musical scales with notation, with the ability to record and compare a user's input from a microphone (sing star style). You just saved me one big headache!

Tj Shredder's icon
Max Patch
Copy patch and select New From Clipboard in Max.

another way to do it:

seejayjames's icon

zl scramble... nice new addition!

Chris Muir's icon

I hadn't noticed the scramble mode either. Cool.