[PD] Pass arg to Pd via terminal

Christof Ressi info at christofressi.com
Tue Jun 9 12:03:43 CEST 2020


Actually, I've thought if we could use a semicolon to seperate patch 
from arguments:

pd -open "mypatch1.pd; 1 2 3" -open "mypatch2; foo bar"

Unfortunately, semicolons are not really reserved characters for 
filenames, neither on Windows, nor on Linux/macOS, but their use is 
certainly discouraged.

On the other hand, colons are forbidden characters on Windows and macOS, 
but not on Linux. This means they are not 100% safe, but maybe better 
than semicolons. On Pd we don't need to delimit every argument (because 
arguments are already delimited by spaces), so a single colon between 
patch name and arguments would be sufficient:

pd -open "mypatch1.pd: 1 2 3" -open "mypatch2: foo bar"

Personally, I like this more than using "stateful" command options like 
"-args".

Christof

On 09.06.2020 11:13, Mario Buoninfante wrote:
> ChucK uses an interesting syntax to pass arguments to programs that we 
> could consider borrowing:
>
> > chuck myprog.ck:23:anotherArg myprog2.ck:42 <http://myprog2.ck:42>
>
> that in our case would be:
> > pd mypatch.pd:23:anotherArg mypatch2.pd:42
>
>
>
> _______________________________________________
> Pd-list at lists.iem.at mailing list
> UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20200609/bc490dde/attachment.html>


More information about the Pd-list mailing list