Another way is to generate a random number, save this number and use it as a seed the next time the patch gets opened. This way you will always have a fresh seed.
Two examples attached, random.pd saves the seed within the patch, random2.pd saves the seed in a text file. random2.pd throws an error the first time, if the text file is not present.
best, ingo
On 05/30/2018 04:41 PM, Claude Heiland-Allen wrote:
On 30/05/18 15:17, Jean-Marie Adrien wrote:
Hi everyone, trying to open a patch with a different text on screen each time random. Used random object as always since 20 years with a loadbang. Discovered that this loadbang/random seems to generate always the same result on opening :)
It's a feature. But not having non-determinism is a bit awkward sometimes.
What is the correct way to get a random digit on patch load within say 30 choices ?
You can generate a random number before starting Pd and -send it to your patch on load. (requires knowledge of shell/cmd scripting) (this is the approach I took in my 'dynamo' project: https://code.mathr.co.uk/dynamo )
You can try to read raw binary data from /dev/urandom, perhaps with [soundfiler] or [readsf~] (requires an OS with this device, and I have not tested it)
You could try reading from [adc~] or analogue sensor pins (requires some unpredictable signal input, possibly special hardware)
You could try [delay] with [realtime] (you might get one or two bits of randomness each time)
You could try an external (maybe some function of calendar time will look random enough? I think zexy has date support)
Claude