Is there any way to get the Pure Data Pd windows console messages into a message box within the patch? I'm trying to get error messages back into the patch so that the patch can react to them.
Asked
Active
Viewed 821 times
1 Answers
4
the only way to do this (in Pd-vanilla even) is to:
- send all post/error messages to the stderr (with the
-stderr
startup flag) - redirect the stderr to stdout
- capture the stdout with a script, reformat it and send it back to Pd via the network (preferrably UDP)
- add a
[netreceive]
to get the messages.
something like the following:
$ pd -stderr 2>&1 | while true; do pdsend 9999 localhost udp; done
and in Pd add the following to your patch:
[netreceive 9999 1]
|
[route error:]
|
[list prepend set]
|
[list trim]
|
[ (
now whenever Pd prints a line starting with "error:" this line will appear in the msgbox.
caveats: this effectively suppresses all messages on the Pd-console.

umläute
- 28,885
- 9
- 68
- 122
-
I'm getting "-bash: pdsend: command not found". I'm puzzled. Can I run pd object's out from pd, or what, hmm? – atonus Nov 17 '15 at 13:51
-
1`pdsend` is a small utility that comes with Pd. Where the actual binary lives, depends on your OS/installation (of which you haven't revealed anything) – umläute Nov 17 '15 at 20:56
-
Oh, yeah, I'm running it on raspbian wheezy. – atonus Nov 19 '15 at 16:45
-
1there's the `puredata-utils` package that provides a `pdsend` binary. – umläute Nov 20 '15 at 18:23