XML Feeds

.

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

Chris Muir cbm at well.com
Thu Aug 2 17:11:58 MDT 2007


At 12:00 AM +0200 8/3/07, Peter Castine wrote:
>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.

Well, my solution will give you fairly arbitrary resolution (repeated here with an added numberbox for variable resolution):

#P window setfont "Sans Serif" 9.;
#P number 154 98 60 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 58 89 15 0;
#P flonum 58 160 70 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 58 140 128 196617 scale 0 25600 -128. 128.;
#P newex 58 108 76 196617 random 25600;
#P comment 217 98 55 196617 resolution;
#P connect 5 0 2 2;
#P connect 5 0 1 1;
#P connect 2 0 3 0;
#P connect 1 0 2 0;
#P connect 4 0 1 0;
#P window clipboard copycount 6;

It's probably not as good as the Litter solution, but the price is right.

-C

-- 
Chris Muir           | "There are many futures and only one status quo.
cbm at well.com         |  This is why conservatives mostly agree,
http://www.xfade.com |  and radicals always argue." - Brian Eno


More information about the maxmsp mailing list