Hi,
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.
Pierre.
On Wed, 2012-11-14 at 14:53 +0000, Enrique Erne wrote:If you happen to start Pd always from bash / command-line, you do
> 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
>
something like this:
pd -noprefs -nogui givemerandom.pd -send "seed $RANDOM"
and in your patch:
[r seed]
|
[seed $1(
|
[random]
However, I also would be interested in a solution that works without
command-line arguments.
Roman
_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list