[PD] Random

Martin Peach chakekatzil at gmail.com
Wed May 30 16:45:49 CEST 2018


On Wed, May 30, 2018 at 10:17 AM, Jean-Marie Adrien <jm.adrien.mnt at gmail.com
> 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
> :)
> What is the correct way to get a random digit on patch load within say 30
> choices ?
>

This patch uses [time] to seed the random sequence.

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20180530/dbf907af/attachment.html>
-------------- next part --------------
#N canvas 681 153 450 443 16;
#X obj 121 96 time;
#X obj 145 133 *;
#X obj 133 169 *;
#X obj 121 207 *;
#X floatatom 121 242 9 0 0 0 - - -;
#X obj 229 81 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 121 275 seed \$1;
#X obj 121 363 print >>>;
#X obj 74 22 loadbang;
#X obj 121 321 random 30;
#X obj 74 59 t b b;
#X connect 0 0 3 0;
#X connect 0 1 2 0;
#X connect 0 2 1 0;
#X connect 0 3 1 1;
#X connect 1 0 2 1;
#X connect 2 0 3 1;
#X connect 3 0 4 0;
#X connect 4 0 6 0;
#X connect 5 0 0 0;
#X connect 6 0 9 0;
#X connect 8 0 10 0;
#X connect 9 0 7 0;
#X connect 10 0 9 0;
#X connect 10 1 0 0;


More information about the Pd-list mailing list