[PD] Random - Different seed each time the patch is loaded

Martin Peach martin.peach at sympatico.ca
Thu Sep 4 19:29:23 CEST 2008

IOhannes m zmölnig wrote:
>Ignacio Viano wrote:
> > I want many (let's say 10) [random] objects that give different series
> > of numbers each time the patch is loaded (of course, the 10 [random]
> > give different series from each other). I tried using [time] and [date]
> > objects to generate different seeds, but the same seed (different on
> > each load) is given to the 10 [random]. I tried using a mix of [date],
> > [time] and [realtime], but it's quite unreliable. Any ideas?
>the problem is of course, that when opening your patch everything
>happens at the same logical time; so seeding your [random]s with [time]
>(and the like), you will actually seed them all with the same seed, thus
>producing the same series in all instances of [random].
>using [time]+[realtime] should in theory work;
>another idea would be to add a different offset to the basic [time]
>derived seed for each [random]: so all seeds are different (though
>related), which should work fine.
>the really nice solution would be to use a [time]seeded [random] to
>generate the seeds for the other [random]s.

Or have a single random generator inside pd that feeds all the random 
Also /dev/hwrandom on some machines will give 'real' random numbers that 
don't need to be seeded.


More information about the Pd-list mailing list