<div dir="ltr">also use zexy/date then? :)</div><div class="gmail_extra"><br><div class="gmail_quote">2018-05-30 14:59 GMT-03:00 Jean-Marie Adrien <span dir="ltr"><<a href="mailto:jm.adrien.mnt@gmail.com" target="_blank">jm.adrien.mnt@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">the text file seems the best since time things might fail cause patch opens everyday at the same computer time…<br>
or maybe take the nanoseconds…which might differ from one occurrence to the other ...<br>
<div><div class="h5"><br>
> Le 30 mai 2018 à 16:57, Ingo Stock <<a href="mailto:mail@ingostock.de">mail@ingostock.de</a>> a écrit :<br>
> <br>
> Another way is to generate a random number, save this number and use it<br>
> as a seed the next time the patch gets opened. This way you will always<br>
> have a fresh seed.<br>
> <br>
> Two examples attached, random.pd saves the seed within the patch,<br>
> random2.pd saves the seed in a text file. random2.pd throws an error the<br>
> first time, if the text file is not present.<br>
> <br>
> best, ingo<br>
> <br>
> <br>
> On 05/30/2018 04:41 PM, Claude Heiland-Allen wrote:<br>
>> On 30/05/18 15:17, Jean-Marie Adrien wrote:<br>
>>> Hi everyone,<br>
>>> trying to open a patch with a different text on screen each time random.<br>
>>> Used random object as always since 20 years with a loadbang.<br>
>>> Discovered that this loadbang/random seems to generate always the same<br>
>>> result on opening<br>
>>> :)<br>
>> It's a feature.  But not having non-determinism is a bit awkward sometimes.<br>
>> <br>
>>> What is the correct way to get a random digit on patch load within say<br>
>>> 30 choices ?<br>
>> <br>
>> You can generate a random number before starting Pd and -send it to your<br>
>> patch on load.<br>
>> (requires knowledge of shell/cmd scripting)<br>
>> (this is the approach I took in my 'dynamo' project:<br>
>> <a href="https://code.mathr.co.uk/dynamo" rel="noreferrer" target="_blank">https://code.mathr.co.uk/<wbr>dynamo</a> )<br>
>> <br>
>> You can try to read raw binary data from /dev/urandom, perhaps with<br>
>> [soundfiler] or [readsf~]<br>
>> (requires an OS with this device, and I have not tested it)<br>
>> <br>
>> You could try reading from [adc~] or analogue sensor pins<br>
>> (requires some unpredictable signal input, possibly special hardware)<br>
>> <br>
>> You could try [delay] with [realtime]<br>
>> (you might get one or two bits of randomness each time)<br>
>> <br>
>> You could try an external<br>
>> (maybe some function of calendar time will look random enough? I think<br>
>> zexy has date support)<br>
>> <br>
>> <br>
>> Claude<br>
</div></div>> <random.pd><random2.pd>_______<wbr>______________________________<wbr>__________<br>
<div class="HOEnZb"><div class="h5">> <a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
> UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="https://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">https://lists.puredata.info/<wbr>listinfo/pd-list</a><br>
</div></div></blockquote></div><br></div>