Hey all,
How can I get PD to generate a different set of 16 random numbers each time a patch loads? They should be uniformly distributed.
After a few tests it seems [random] always outputs the same values on load which does make sense in terms of pseudorandom numbers.
would doing a snapshot on [noise~] be any better?
Thanks all,
.b.
Have you tried sending a different 'seed' message to each random object?
On 3/17/06, B. Bogart ben@ekran.org wrote:
Hey all,
How can I get PD to generate a different set of 16 random numbers each time a patch loads? They should be uniformly distributed.
After a few tests it seems [random] always outputs the same values on load which does make sense in terms of pseudorandom numbers.
would doing a snapshot on [noise~] be any better?
Thanks all,
.b.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hi Chris,
I only have one random object.
I tried sending a different [random] seed on loadbang, but of course that gives us the same seed each time, and then the random gives the same set of random numbers each time.
Seed just changes the next set of random numbers while PD is running, once you quit and start again, the same [random] will output the same sequence of numbers, no matter what the seed.
I need PD to give me different random numbers for each PD session, not for each loaded patch (which would work) sorry I did not make this clear.
Chris, I'm working on a easier test of my OSX CPU bug, I'll send it to pd-dev once I make sure it still fails. You'll need at least 16 different videos to test it.
.b..
On Fri, March 17, 2006 10:34 am, chris clepper said:
Have you tried sending a different 'seed' message to each random object?
On 3/17/06, B. Bogart ben@ekran.org wrote:
Hey all,
How can I get PD to generate a different set of 16 random numbers each time a patch loads? They should be uniformly distributed.
After a few tests it seems [random] always outputs the same values on load which does make sense in terms of pseudorandom numbers.
would doing a snapshot on [noise~] be any better?
Thanks all,
.b.
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, B. Bogart hat gesagt: // B. Bogart wrote:
How can I get PD to generate a different set of 16 random numbers each time a patch loads? They should be uniformly distributed.
After a few tests it seems [random] always outputs the same values on load which does make sense in terms of pseudorandom numbers.
[realtime] | [seed $1( | [random]
Frank Barknecht _ ______footils.org_ __goto10.org__
Indeed that does it!
Thanks Frank, genius BTW. :)
That way we get a different seed each time (literally) we load the patch.
.b.
On Fri, March 17, 2006 10:48 am, Frank Barknecht said:
Hallo, B. Bogart hat gesagt: // B. Bogart wrote:
How can I get PD to generate a different set of 16 random numbers each time a patch loads? They should be uniformly distributed.
After a few tests it seems [random] always outputs the same values on load which does make sense in terms of pseudorandom numbers.
[realtime] | [seed $1( | [random]
Ciao
Frank Barknecht _ ______footils.org_ __goto10.org__
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo, B. Bogart hat gesagt: // B. Bogart wrote:
Indeed that does it!
Thanks Frank, genius BTW. :)
That way we get a different seed each time (literally) we load the patch.
[realtime] will just give the time since the start of Pd, which can be the same on the same machine. I just tested and I got 3 times 0.031 and 2 times 0.03 out of five tries. But it's builtin. If you can use externals, I think zexy's [time] is a better choice, because normally it doesn't repeat.
Frank Barknecht _ ______footils.org_ __goto10.org__
hi
"B. Bogart" ben@ekran.org wrote:
After a few tests it seems [random] always outputs the same values on load which does make sense in terms of pseudorandom numbers.
afaik, in some programming languages the problem of identical sequences at load time is solved by using the system time to set a start point for the sequence. maybe you can do something similar in pd with [time]. you could sum up all outputs of [time] and add this value to your random number. after all a [mod <desired range>] will keep the random numbers in the desired range.
roman
___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de