[PD] scripting pd printouts
IOhannes m zmoelnig
zmoelnig at iem.at
Fri Apr 27 08:49:58 CEST 2007
Hans-Christoph Steiner wrote:
>
> I've been thinking that it would be very handy to be able to get the
> complete contents of the Pd window in Pd space. Then you could parse
> the error messages in Pd space and have your program respond. I
> tried for a little bit to code it, but it was not as easily as it
> seemed at first glance.
>
i think i (and others) have posted several solutions to this in the past.
however, i think that padawan's question was more into the direction of
how to control pd (itself) from outside, which would not involve such
feedback-like stuff.
so:
1. in order to make printing patches work, the first important thing is,
that you must not disable the gui. after all it is tcl/tk that does the
patch-to-postscript conversion; when you turn it off, you also turn this
feature of pd off.
2. in order to send something to pd via pdsend, you cannot use a syntax
like
> pdsend pd open $i
because this is not how this applications works.
"man pdsend" will reveil that you should do something like:
> echo "pd open $i;" | pdsend 4321
3. you cannot directly control the pd process via pdsend.
pdsend is the command-line version of [netsend], so you can do no more
(and no less) with it than with this object: you will need a
[netreceive] object in the running instance of pd which will receive the
messages sent via pdsend.
if you want to control the pd-server, you will have to send the messages
received at the [netreceive] via pd's messaging system to the server.
(with [send pd])
so basically you will have to start a server pd-patch on your running pd
that does the interfacing to the pdsend.
the simplest version of this patch would be something like:
[netreceive 4321]
|
[s pd]
4. "pd open $i" is not a valid message to open a file.
mfg.asdr
IOhannes
More information about the Pd-list
mailing list