Forums > MaxMSP

how do i tailor RANDOM?

November 3, 2011 | 5:11 pm

i have a couple of RANDOM objects and need to tweak them slightly.

id like to spread the random choices out. so if it chooses x, it wont choose it again for a while.

and also, id like to be able to bias one of the RANDOM objects. so it randomly chooses from lower in the range more frequently, but with occasional choices from the upper range. for example, with a range of 0-20, it will more frequently choose within the region of 0-7, with occasional choices over that.

any help would be much appreciated
Thanks


November 3, 2011 | 5:42 pm
– Pasted Max Patch, click to expand. –

November 3, 2011 | 5:54 pm

The table/itable object can also be used to create weighted random numbers, using bangs.

– Pasted Max Patch, click to expand. –


MIB
November 3, 2011 | 6:01 pm

a couple of other ways… don’t you love Max, always a ton of different solutions :)

– Pasted Max Patch, click to expand. –

November 4, 2011 | 12:16 pm

Basically what you want is a Markov chain (ie, a random number distribution with memory, taking the last several values generated into account when generating the next one). There is the [prob] object in Max that does Markov chains, but setting it up to do what you want takes a bit of work.

I had done some work on Markov chains specifically to do this sort of "don’t repeat the last N values" for the Litter Power package, but I don’t think the object was actually finished. I’m not at a machine where I can check the status, but if there’s interest I can have a look at the weekend.


November 4, 2011 | 3:50 pm

There is interest!


November 4, 2011 | 6:05 pm

good bye weekend.


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