[PD] Random number generation quest

Roman Haefeli reduzent at gmail.com
Wed Nov 14 16:03:08 CET 2012

On Wed, 2012-11-14 at 14:53 +0000, Enrique Erne wrote:
> Hi List!
> Can a random number form 0 to 100 be generated with the following requirements:
>   - No externals / Vanilla Pd only
>   - DSP must be off
>   - The patch is loaded with Pd through command line interface i.e.
> `pd -noprefs -nogui givemerandom.pd`
>   - The output should not always be the same number

If you happen to start Pd always from bash / command-line, you do
something like this:

pd -noprefs -nogui givemerandom.pd -send "seed $RANDOM"

and in your patch:

[r seed]
[seed $1(

However, I also would be interested in a solution that works without
command-line arguments.


More information about the Pd-list mailing list