[PD] Pass arg to Pd via terminal

Christof Ressi info at christofressi.com
Mon Jun 8 14:55:44 CEST 2020


To expand on Jack's answer:

pd -send "foo baz; bar 1 2 3;"

This will send 'baz' to the receiver 'foo' and '1 2 3' to the receiver 
'bar'.

---

Here's a caveat for all Msys2 users on Windows: by default the Msys2 
terminal interprets messages starting with a forward slash as absolute 
file paths and prepends them with the Msys2 installation path. For example,

pd -send "/foo/bar 1 2 3"

will yield the following Pd error:

"C:/msys64/foo/bar: no such object"

Apparantly there's a way to turn this off with an environmental variable 
but I couldn't make it work. A possible workaround is to replace the 
first forward slash with a backslash:

pd -send "\foo/bar 1 2 3"

I once had been tearing my hear out for 1 hour, so I thought I'd better 
share this.

Christof

On 08.06.2020 14:32, Mario Buoninfante wrote:
On 08.06.2020 14:43, Jack wrote:
> Hello Mario,
>
> If you do :
> $ pd --help
>
> you should get a line with :
> -send "msg..."   -- send a message at startup, after patches are loaded
>
> ++
>
> Jack
>
>
>
> Le 08/06/2020 à 14:32, Mario Buoninfante a écrit :
>> Hi,
>>
>> Is it possible to pass arguments to Pd via terminal?
>> I know we don't have [stdin], but I was wondering if there is any other way.
>>
>> Cheers,
>> Mario
>>
>> _______________________________________________
>> Pd-list at lists.iem.at mailing list
>> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
>>
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list