[PD] Execute command from Pd

Antoine Rousseau antoine at metalu.net
Mon May 29 13:03:09 CEST 2017


>
> And does anybody know if any of them are blocking so that the timing of an
> external script is deterministic from within Pd's logical timeframe?


afaik only [system] is blocking, while [shell] and [popen] use Pd polling
system through Pd main loop.



> I find it hard to kill a still running command, especially when I want to
> kill a specific one when many are running.


I would suggest writing your own script, that would call jacktrip, and
which would take an additional (but ignored) ID parameter, which could then
be used to identify each of the processes, to allow killing them
individually with pkill.

For instance:

[my_script.sh ID1 ACTUAL_PARAMETERS &]
|
[shell or system or popen]

then:

[pkill -f my_script.sh ID1 &]
|
[shell or system or popen]


Antoine Rousseau
  http://www.metalu.net <http://metalu.net> __
http://www.metaluachahuter.com/
<http://www.metaluachahuter.com/compagnies/al1-ant1/>


2017-05-29 11:40 GMT+02:00 Roman Haefeli <reduzent at gmail.com>:

> On Mon, 2017-05-29 at 10:50 +0200, Antoine Rousseau wrote:
> > for full duplex:
> >
> > pdreceive 5678 | your_command | pdsend 6789 &
> >
> > see attached patch (using ggee/shell, but would also works with e.g
> > motex/system).
> >
>
> Thansks. From what I understand this allows you to write to talk to the
> stdin of the launched command. That's a neat trick.
>
> My main problem is still that I find it hard to kill a still running
> command, especially when I want to kill a specific one when many are
> running.
>
> Roman
> _______________________________________________
> 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/20170529/fa0b0900/attachment.html>


More information about the Pd-list mailing list