Forums > MaxMSP

Urn/Random sending multiple outputs

Dec 01 2009 | 5:07 pm

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 :)

Dec 01 2009 | 5:15 pm

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.

Dec 01 2009 | 5:55 pm


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.

Dec 01 2009 | 6:21 pm


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.

Dec 01 2009 | 6:36 pm

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

-- Pasted Max Patch, click to expand. --

Dec 01 2009 | 7:05 pm

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!

Jan 05 2010 | 5:04 am

another way to do it:

-- Pasted Max Patch, click to expand. --

Jan 05 2010 | 9:30 pm

zl scramble… nice new addition!

Jan 05 2010 | 10:02 pm

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

Viewing 9 posts - 1 through 9 (of 9 total)

Forums > MaxMSP