Forums > MaxMSP

Randbetween

March 31, 2011 | 9:12 am

Does any one have a patch or know how to simply rand between 2 numbers or floats?


March 31, 2011 | 9:21 am

hey – I’ve made an abstraction that works in that way (you define minimum, maximum, and step size – works with floats and negative numbers).

It’s [lao.rand], here: http://cycling74.com/toolbox/lao-patchers/ . (instructions are in the "readme" file)

Enjoy :)


March 31, 2011 | 9:30 am

is their not any way from just normal included stuff?

if so please post source, thank you.


March 31, 2011 | 10:25 am

Just look at the scale object and place it after a random object…


March 31, 2011 | 11:11 am

I have a pair of abstractions, RandomRange, and RandomRangeFloat:

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

March 31, 2011 | 11:43 am

[expr ($i2) + (random(0,(($i3-$i2)+1))]

range low, range high


March 31, 2011 | 7:06 pm

And, of course, the Litter Power objects. You can initialize any of the basic integer random number generators with a range, eg. [lp.tata 42 94].

For floating point you would connect [lp.shhh] — floating point in the range [0..1) — to any scaling object.


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