alternatives to random/urn – select for choosing values randomly

Apr 15, 2008 at 9:31am

alternatives to random/urn – select for choosing values randomly

Hi all

I use the combination of random or urn objects sending bangs to select objects which are connected to values stored in numberboxes, message boxes etc for “randomly” variating parameters.

Then I use one or more select argument numbers for weightening i.e
increasing the chance for this value to be triggered.

This is something I do everywhere, so im looking for easy variations on these technique.

If you show me some, I be very happy ! !

#36931
Apr 15, 2008 at 10:05am

You also posted the thread with the line object and the three numboxes, right? I’m afraid i don’t really understand what you are getting at. Are you seeing patterns in the output of [random]? Or do you want your output to be random, but not quite so wild?

The only other objects i know of are [drunk] and [decide]. Drunk might be of some use to you. But [random] really gives you enough randomness. You could add a feedback to random to create a slower moving one, or multiply multiple randoms to generate non-uniform noise (see patch)

But I think you should try to post a patch to show us why your output isn’t satisfactory, that way things get a lot clearer.

#P user multiSlider 678 317 204 57 0. 127. 1 3177 15 0 0 2 0 0 0;
#M frgb 0 0 0;
#M brgb 255 255 255;
#M rgb2 127 127 127;
#M rgb3 0 0 0;
#M rgb4 37 52 91;
#M rgb5 74 105 182;
#M rgb6 112 158 18;
#M rgb7 149 211 110;
#M rgb8 187 9 201;
#M rgb9 224 62 37;
#M rgb10 7 114 128;
#P toggle 678 141 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 678 161 46 196617 metro 5;
#P newex 678 289 117 196617 scale 0. 16129. 0. 127.;
#P button 678 186 15 0;
#P newex 678 267 29 196617 * 0.;
#P newex 678 208 30 196617 t b b;
#P newex 744 236 64 196617 random 127;
#P newex 678 236 64 196617 random 127;
#P connect 5 0 8 0;
#P connect 7 0 6 0;
#P connect 6 0 4 0;
#P connect 3 0 5 0;
#P connect 4 0 2 0;
#P connect 2 0 0 0;
#P connect 2 1 1 0;
#P connect 0 0 3 0;
#P connect 1 0 3 1;
#P window clipboard copycount 9;

#127126
Apr 15, 2008 at 12:07pm

Peter Castine’s Litter package and my own random number package from

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

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson

> From: petterdass
> Organization: Cycling ’74
> Reply-To:
> Date: Tue, 15 Apr 2008 03:31:29 -0600
> To:

> Subject: [maxmsp] alternatives to random/urn – select for choosing values
> randomly
>
>
> Hi all
>
> I use the combination of random or urn objects sending bangs to select objects
> which are connected to values stored in numberboxes, message boxes etc for
> “randomly” variating parameters.
>
> Then I use one or more select argument numbers for weightening i.e
> increasing the chance for this value to be triggered.
>
> This is something I do everywhere, so im looking for easy variations on these
> technique.
>
>
> If you show me some, I be very happy ! !

#127127
Apr 15, 2008 at 2:26pm

If you’re at all serious about random numbers, you really ought to look at Litter Power. URI below.

I couldn’t live without Litter Pro, but you’ll probably find the Litter Starter Pack gives you a great choice of different random number distributions.

Without any examples of what you’re trying to do it is hard to make concrete recommendations for a specific object. I’d just suggest you look at lp.bernie for Bernoulli (“weighted”) distributions and lp.norm for a normal (Gaussian) distribution.

Bas van der Graaff wrote:
> The only other objects i know of are [drunk] and [decide].

You haven’t lived until you’ve tried lp.ginger ;-)

Gary’s objects are nice, too, particularly for their seed model.

#127128
Apr 16, 2008 at 1:54am

Quote: Peter Castine wrote on Tue, 15 April 2008 07:26
—————————————————-
>
> You haven’t lived until you’ve tried lp.ginger ;-)
>
> Gary’s objects are nice, too, particularly for their seed model.

—————————————————-

lp.ginger is very cool! Very nice random numbers, and a fun cool concept for creating the numbers. I’m not sure how the 2nd oracle number is related to the first? Is it “predictive” (the future oracle part makes me think that)?

I didn’t see ginger in there til this post. ( I must say it’s pretty cool and nice to generate more than one random number at the same time (unless the 2nd oracle number is indeed mathmatically related to the 1st number.

#127129
Apr 16, 2008 at 1:45pm

Ginger throws I Ching oracles. The I Ching practice is that an oracle consists of six lines (a hexagram); the individual lines can be in one of four states: old yin, young yin, old yang, young yang. Old yin and old yang are “changing” lines. That is, they change from the “present state” to the “future state” in the future, thereby (possibly) generating a second, different oracle.

The full explanation is in Richard Wilhelm’s magnificant translation of the I Ching. If you open up lp.ginger.help and select Bibliography from the “See Also” popup, an English translation is listed.

For a quick introduction, check out < http://en.wikipedia.org/wiki/I_Ching_divination>

Very briefly: the future and present oracles are related, but by a random process. Also, the I Ching oracles are **not** a flat distribution, nor are they supposed to be.

In Litter Pro there is also an object generating the text of the oracles (lp.i) and an object that recreates John Cage’s idiosyncratic method to select from sets smaller than the 64 choices normally given by the I Ching (lp.kg). More fun!

Best,
Peter

#127130
Apr 16, 2008 at 5:38pm

what i tried to do is making the RM modulator glide between the starting values in the three numberboxes.
I try to reaaly understand what can be done with the simplest max building blocks :

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 543 279 62 9109513 1000 , 0 3000;
#P message 341 256 62 9109513 0 , 3000 4000;
#P newex 393 321 40 9109513 line;
#B color 5;
#P message 437 271 53 9109513 63 , 0 3000;
#P newex 543 216 28 9109513 sel 2;
#P newex 477 216 28 9109513 sel 1;
#P newex 341 226 31 9109513 sel 0;
#P number 698 156 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 355 156 15 0;
#P number 418 99 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter;
#X flags 0 0;
#P newobj 319 115 66 9109513 counter;
#P inlet 319 51 15 0;
#P message 606 114 28 9109513 clear;
#P newex 606 172 27 9109513 urn;
#P newex 48 513 27 9109513 1;
#N vpreset 1;
#X append 1 2 3 381 516 flonum float 0. ; 4 355 393 flonum float 0. ; 14 454 516 flonum float 1. ; 22 99 418 number int 8 ; 24 156 698 number int 3 ;;
#P preset 48 538 47 27;
#P newex 48 486 45 9109513 loadbang;
#P window setfont “Fixedwidth Serif” 10.;
#P flonum 516 454 39 10 0. 1. 163 141 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 311 537 30 9240586 *~;
#P newex 516 497 38 9240586 line~;
#P message 516 475 38 9240586 $1 50;
#P message 443 413 38 9240586 $1 50;
#P newex 443 432 38 9240586 line~;
#P newex 393 517 31 9240586 +~;
#P newex 516 432 73 9240586 expr 1.-$f1;
#P newex 393 432 43 9240586 cycle~;
#P newex 394 474 26 9240586 *~;
#P flonum 393 355 44 10 0 0 0 141 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 516 381 44 10 0. 1. 3 141 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont “Sans Serif” 9.;
#P newex 311 491 36 9109513 cycle~;
#P inlet 311 459 15 0;
#P outlet 310 584 15 0;
#P connect 24 0 18 1;
#P connect 23 0 18 0;
#P connect 19 0 18 0;
#P fasten 18 1 19 0 628 197 677 197 677 107 611 107;
#P connect 27 0 31 0;
#P fasten 18 0 25 0 398 191;
#P fasten 18 0 26 0 464 191;
#P fasten 18 0 27 0 521 191;
#P connect 11 0 12 0;
#P connect 14 0 11 0;
#P connect 7 0 14 0;
#P connect 3 0 10 0;
#P connect 3 0 7 0;
#P connect 10 0 9 0;
#P connect 26 0 28 0;
#P connect 12 0 8 1;
#P connect 9 0 5 1;
#P connect 6 0 5 0;
#P connect 5 0 8 0;
#P connect 4 0 6 0;
#P connect 29 0 4 0;
#P connect 31 0 29 0;
#P connect 30 0 29 0;
#P connect 28 0 29 0;
#P connect 22 0 21 4;
#P connect 21 2 23 0;
#P connect 25 0 30 0;
#P connect 8 0 13 1;
#P connect 20 0 21 0;
#P connect 2 0 13 0;
#P connect 1 0 2 0;
#P connect 13 0 0 0;
#P connect 17 0 16 0;
#P connect 15 0 17 0;
#P window clipboard copycount 32;

#127131
Apr 16, 2008 at 7:03pm

On Apr 16, 2008, at 10:38 AM, petterdass wrote:
> what i tried to do is making the RM modulator glide between the
> starting values in the three numberboxes.
> I try to reaaly understand what can be done with the simplest max
> building blocks :

I’m not clear what you’re asking here. What are you trying to
accomplish here that this patch doesn’t do?

Chris Muir
cbm@well.com

http://www.xfade.com

#127132

You must be logged in to reply to this topic.