"brownian" in RTC-lib

Feb 16, 2006 at 2:55pm

"brownian" in RTC-lib

hi all,

when I use “brownian 1 2 0.5″ it supose to give me
1′s and 2′s, right? but I’m getting only ones..

this object works well with intergers? or I’m doing something wrong?

#24461
Feb 16, 2006 at 5:47pm

On around Feb 16, 2006, at 15:55, bbarros said something like:
> hi all,
>
> when I use “brownian 1 2 0.5″ it supose to give me
> 1′s and 2′s, right? but I’m getting only ones..

You probably need to use explicit floats for all parameters, viz:

[brownian 1. 2. 0.5]

Otherwise you’re in the integer domain and the output range is 1 < = x <
2, which would explain your problem.

But I don’t know for sure. For Brownian motion I use lp.pfff from
Litter Power. It’s even a Starter Pack object. For more flexibility,
there’s lp.pvvv from Litter Pro.

Caveat: the syntax is a little different from Gerhard’s.

Hope this helps,
Peter
————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine | ^
| Litter Power & Litter Bundle for Jitter
pcastine@gmx.net |
pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
4-15@kagi.com | for Max/MSP
| Extremely cool
| http://www.dspaudio.com
| http://www.dspaudio.com/software/software.html

#70765
Feb 16, 2006 at 7:09pm

“brownian 1 2 0.50″ gives you *many, many* 1s and *very few* 2s. The
higher you set the variation parameter the more 2s you will get.

b.

max v2;
#N vpatcher 331 167 676 477;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 46 240 41 196617 print 2;
#P newex 46 211 32 196617 sel 2;
#P toggle 46 46 15 0;
#P newex 46 72 52 196617 metro 20;
#P number 158 72 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 102 72 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 214 72 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 46 178 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P button 46 107 15 0;
#P newex 46 143 179 196617 brownian 1 2 0.50;
#P connect 7 0 6 0;
#P connect 6 0 1 0;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P connect 2 0 8 0;
#P connect 8 0 9 0;
#P connect 4 0 0 1;
#P connect 5 0 0 2;
#P connect 3 0 0 3;
#P pop;

________________________

http://loibner.cc

#70766
Feb 16, 2006 at 9:19pm

thanks peter and bernhard :)

this object outputs random numbers excluding max,
maybe it was not a good choice for that situation:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 558 232 73 196617 select 0 1 2 3;
#P button 524 142 15 0;
#P user rslider 562 140 145 23 4 1 0 0 1;
#P newex 548 201 87 196617 brownian 0 3 0.5;
#P newex 567 177 58 196617 unpack 0 0;
#P connect 1 0 4 0;
#P connect 3 0 1 0;
#P connect 2 0 0 0;
#P connect 0 0 1 1;
#P connect 0 1 1 2;
#P window clipboard copycount 5;

so.. the solution to use “brownian” with intergers is to add 1 to the
maximal value?

thanks again,
bernardo

#70767
Feb 16, 2006 at 9:49pm

On around Feb 16, 2006, at 22:19, bbarros said something like:
> so.. the solution to use “brownian” with intergers is to add 1 to the
> maximal value?

Well, the Brownian model doesn’t really work with two integers anyway.
The brownian abstraction is trying to simulate calculations in the real
(float) domain by dividing the actual min/max into 65000 subdivisions.
That won’t fool a mathematician, but is probably good enough for a lot
of uses in Max. If you’re working with floats.

I’m not sure what sort of an effect you’re actually after.

If you’re looking for some kind of coin-flipper, perhaps with different
probabilities for “heads” and “tails”, you can build something
following the examples from the early Max random objects tutorials. Or
just take lp.bernie (Litter Starter Pack, URI below).

If you want something else… well, you can probably also do it with
Litter Power.

Hope this helps — Peter

>
————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine | ^
| Litter Power & Litter Bundle for Jitter
pcastine@gmx.net |
pcastine@bek.no | iCE: Sequencing, Recording, and Interface Building
4-15@kagi.com | for Max/MSP
| Extremely cool
| http://www.dspaudio.com
| http://www.dspaudio.com/software/software.html

#70768
Feb 17, 2006 at 10:24am

I am also not quite sure what you are after. The interesting thing
about “brownian” is the fact that you can adjust the distance between
choices. If you just want a stream of random numbers there are
several max objects that serve this purpose: random, urn, drunk.

RTC-lib and Litter give you many more options for generating events
based on random operations.

hth
B.

________________________

http://loibner.cc

#70769

You must be logged in to reply to this topic.