Forums > MaxMSP

random seeds

May 10, 2006 | 11:28 am

Hi randomisers…

I know that random and urn can be seeded from a number dependent on the time since system start-up (seed 0) but I’m working on something that will start-up at the same time every day, and various parts of the program will be triggered at fixed times. This suggests that theoretically I could get the same sequence of events happening every day. < < or is this extremely unlikely?>>

To avoid this i just thought of generating the seed from sampling a piece of incoming audio (microphone) – remembering that some computer (atari1040ST?) used to provide random numbers by sampling some noisy piece of circuitry -

is there a simpler, cooler way to do this? do anyones externals generate random seeds in a different way?

- i looked in the archives but people seemed to be more interested in repeating a random sequence of events!

groeten, justin.


May 10, 2006 | 1:40 pm

you could use a prime number generatorr… i.e. tap.prime

or use the output of the object itself multiplied by the cpuclock ?


May 10, 2006 | 5:59 pm

Hi Brian,

I was just about to say that I can’t see why either of your suggestions would make it more random. but now it suddenly dawns on me while typing: you’re right about the system clock because of course the date component is different every day.

But why Prime?

thanks, justin.


May 11, 2006 | 7:07 am


May 11, 2006 | 9:26 am

afaik computers report time since startup in ticks (1/60th of a second), so that would be unlikely, or at least unlikely to where the sequence might repeat once or twice a year, which you would be highly unlikely to notice. Personally I use the julian date&time.


May 11, 2006 | 9:51 am

yeah, once or twice a year no-one is going to notice!
Right now i’m making a seed by mangling the current date into
a useful number. justin.


May 11, 2006 | 10:00 am

maybe someone should modify the date + time object to accept the commands julian / orthodox / chinese / jewish / islamic / mayan / etc… in the interests of temporal diversity. ok, someone has probably done it already!


May 12, 2006 | 4:24 am

On around May 10, 2006, at 13:28, justin bennett said something like:
>is there a simpler, cooler way to do this? do anyones >externals generate random seeds in a different way?

Yes.

The entire suite of Litter Power RNGs base their seed on multiple items drawn from the OS that will not repeat themselves. Ever. They also use an industrial-strength random number generator, rather than the Linear Congruence generator used by random and urn.

If you’re seriously interested in random numbers, you owe it to yourself to take a look at Litter Power. The Starter Pack is free. URI below.

Best, Peter

————– http://www.bek.no/~pcastine/Litter/ ————–
Peter Castine (HTML doesn’t like the rest of this .signature)


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