XML Feeds

.

[maxmsp] Re: Random between +/- 128.0??

Peter Castine pcastine at gmx.net
Thu Aug 2 16:00:41 MDT 2007


A belated but necessary response:

#P window setfont "Sans Serif" 10.;
#P flonum 139 175 79 10 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 139 98 15 0;
#P window linecount 1;
#P newex 139 147 155 196618 lp.scampf map 0 1 -128 128;
#P newex 139 118 46 196618 lp.shhh;
#P connect 1 0 3 0;
#P connect 2 0 0 0;
#P connect 0 0 1 0;
#P window clipboard copycount 4;

The other solutions using the stock random object will only give you a limited resolution. For instance, Keith's solution will only give you numbers in increments of 0.1, it'll never give you a random value like 42.14159. 

Lp.shhh will generate all possible values in the range from 0<=x<1 and scampf will scale them to the desired range.

These two objects are in the freeware Litter Starter Pack. For better or worse, the Starter Pack is still PPC-only in the Mac world, but UB versions are available with the Pro Bundle.

And all Litter Power versions give you much more interesting random number distributions to choose from.

Best,
Peter
--
--------------    http://www.bek.no/~pcastine/Litter/    -------------
Peter Castine             +--> Litter Power & Litter Bundle for Jitter

iCE:  Sequencing,  Recording & Interface  Building  for Max/MSP   Extremely cool   http://www.dspaudio.com/



More information about the maxmsp mailing list