Forums > MaxMSP

i think its called "random ab"

October 11, 2006 | 5:01 pm

where can i find that random object that lets you set the range of the random numbers to chose from? i think i have heard it called random ab. does any one know what im talking about?

Rob


October 11, 2006 | 5:21 pm

that is one of gary nelsons objects

http://www.timara.oberlin.edu/~gnelson/maxdownloads/downloadmax.htm



jln
October 11, 2006 | 5:26 pm


October 11, 2006 | 5:31 pm


October 11, 2006 | 5:36 pm

try this… it’s simple

max v2;
#N vpatcher 296 115 1012 719;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 370 230 100 196617 high value (float);
#P comment 327 211 100 196617 low value (float);
#P outlet 238 336 19 0;
#P newex 238 295 113 196617 scale 0. 10000. $1 $2;
#N comlet bang to get a random value;
#P inlet 238 137 19 0;
#P newex 238 260 73 196617 random 10000;
#N comlet high value (float);
#P inlet 372 247 17 0;
#N comlet low value (float);
#P inlet 323 230 18 0;
#P comment 266 138 100 196617 bang;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P connect 5 0 6 0;
#P fasten 1 0 5 3 328 282 303 282;
#P fasten 2 0 5 4 377 288 323 288;
#P pop;


October 11, 2006 | 9:46 pm

I think it’s called lp.tata

:-!

Yes, of course you can abstract this with the stock random, or use Gary’s objects. But lp.tata uses a stronger random number algorithm *and* you can instantiate it as [lp.tata 10 20] or whatever you want.

And it’s part of the Litter Starter Pack, so it’s free.

I think the URI is in the .sig, but when I write directly to the forum I’m never sure, so: http://www.bek.no/~pcastine/Litter/

UB versions under beta test by Litter Pros.

Best,
Peter


October 11, 2006 | 9:57 pm

thanks every one!


October 11, 2006 | 10:17 pm

On Oct 11, 2006, at 2:46 PM, Peter Castine wrote:

> But lp.tata uses a stronger random number algorithm *and* you can
> instantiate it as [lp.tata 10 20] or whatever you want.
any chance of getting an inlet to feed lp.tata a new seed value?


October 11, 2006 | 10:40 pm

Won’t the seed message do the trick?

All Litter RNGs grok seed.

There is a design point to be aware of: if you want a particular instance of, say, lp.tata to maintain its own seed, you must instantiate it with an explicit non-zero seed (for instance [lp.tata 1 127 -12345], in which case -12345 is the initial seed).

If you don’t include a seed argument–ie, you just write [lp.tata 1 127]–then the object uses a global random number pool and the seed message re-juggles the pool for all instances of (in this case) lp.tata, except any that were initialized with explicit non-zero 3rd arguments.

This may not be entirely obvious, but it’s quite a powerful set up.

The seed message is sort of buried in the old .PDF documentation. I hope it’s a little more obviously accessible in the "Litter Messages" item in the See Also popup menu in the new Litter .help files.


October 12, 2006 | 1:43 am

On Oct 11, 2006, at 3:40 PM, Peter Castine wrote:

>
> Won’t the seed message do the trick?
>
> All Litter RNGs grok seed.

thanks! :) when I opt-crtl’d on the object I saw the ‘seed [int]‘
message…

max v2;
#N vpatcher 11 49 611 449;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 178 162 103 196617 sprintf seed %i%i%i;
#P button 163 65 15 0;
#P newex 163 87 48 196617 loadbang;
#P message 163 111 30 196617 time;
#P newex 163 136 40 196617 date;
#P newex 178 188 124 196617 lp.tata;
#P connect 4 0 3 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P connect 1 1 5 0;
#P connect 5 0 0 0;
#P pop;


October 12, 2006 | 8:16 am

> UB versions under beta test by Litter Pros.
>
> Best,
> Peter
> –
> ————–

How’s that going ? Any chance us amateurs will see
them soon ?
cheers
Roger


October 12, 2006 | 8:55 pm

Nice demo patch, Kim. On the loadbang front, note that all Litter RNGs and noise objects seed themselves during class initialization based on time of day, uptime, machine address of the seed pool, and various other exotica. So the auto-seed is already pretty random.

There has been one issue on XP reported, which I suspect was related to a broken QTML install. Currently Litter Power on XP uses QTML for things like time-of-day and uptime. I’m moving all this stuff to native Windows calls as part of general maintenance, but it’s only been medium priority (QTML seems to work fine for almost everyone, at least the to the extent that Litter uses it).

Finally, to Roger’s question about availability: work on finishing up Litter Power 1.7 has been delayed due to death in the family requiring my presence in the US. I have limited Internet access here but software development is not possible at this time. There are few things more important to me than Litter Power, but this is one of them. Sorry. A more positive announcement will be made ASAP, but no sooner.

– Peter


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