[PD] help_random/seed
IOhannes m zmölnig
zmoelnig at iem.at
Sat Jul 4 11:34:36 CEST 2009
Frank Barknecht wrote:
> Hallo,
> cem guney hat gesagt: // cem guney wrote:
>
>> just started studying PD. going through the control examples i've been
>> stuck trying to figure out the function of the message, seed 123 in the
>> example for "random".
>>
>> not sure if i figured out the explanation below,
>>
>> Seeds are kept locally so that if two Randoms are seeded the same they
>> will have the same output (or indeed you can seed the same one twice to repeat the output.)
>
> Yes, that's true, you understood correctly.
>
> Oh, wait, that's what's in the help-file! What exactly is cloudy there?
>
probably the simple fact, that [random] despite of it's name does not
really produce random numbers.
mostly when computers present you a "random" number, then this number
will only appear to be random, but in reality is just calculated as the
next item of a totally deterministic series.
(as a matter of fact, a new random number is usually generated by simple
taking the last number and then applying some more or less complicated
transformation on this number). this method is known as "pseudo random".
you can set the "starting point" of the series by setting the "seed",
which is the first number of the random sequence). since all [random]
object use the same algorithm to calculate the next pseudo-random
number, they will all end up with the same sequence if they all start
with the same "seed".
by default Pd uses different seeds for all [random] objects so they all
appear to work independently.
mfgasdr
IOhannes
More information about the Pd-list
mailing list