[PD] Random number generation quest
pimassat at gmail.com
Wed Nov 14 16:36:30 CET 2012
You could use the [shell] object to run a little bash script that would ask
the current time in milliseconds from your system, and send it as a seed to
Pd using pdsend. This way you wouldn't need any extra command line
arguments. I don't know whether this is worth the trouble, though.
2012/11/14 Roman Haefeli <reduzent at gmail.com>
> 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
> > - 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.
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management ->
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list