2

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.

Max N
  • 1,134
  • 11
  • 23
atonus
  • 114
  • 12

1 Answers1

4

the only way to do this (in Pd-vanilla even) is to:

  1. send all post/error messages to the stderr (with the -stderr startup flag)
  2. redirect the stderr to stdout
  3. capture the stdout with a script, reformat it and send it back to Pd via the network (preferrably UDP)
  4. 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