[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] random seeds



super that's it. this should be mentioned somewhere in the Thread help. that was why i was asking about being able to spotlight .sc files ;-) as i see the whole Thread.help.rtf is practically empty, and i'm a bit lazy now ;-9 so maybe just these extra lines in Routine.help.rtf :

"
randSeed_

sets the routine's seed for random number generation. the seed is an arbitrary integer number which by default is created from the current system date (is that correct???). you can explicitly set the seed to be able to reproduce the same series of random numbers.

	// use default (varying) seed
	r = Routine({10.do{10.rand.postln}}).play;
	r = Routine({10.do{10.rand.postln}}).play;	// different series

	// use custom seed
	r = Routine({10.do{10.rand.postln}}).randSeed_(1000).play;
r = Routine({10.do{10.rand.postln}}).randSeed_(1000).play; // same series again
"	

best, -sciss-



Am 06.06.2006 um 14:56 schrieb Joshua Parmenter:

r = Routine({10.do{10.rand.postln}}).randSeed_(1000).play;