[PD-dev] Messaging between Pd and GUI

IOhannes m zmoelnig zmoelnig at iem.at
Wed Jun 4 08:44:42 CEST 2008


Tarakajian, Samuel wrote:
> Hi everyone,
> So I trying to develop what amounts to a new implementation of the Pd GUI.  The first step was of course to remove the old GUI, which is actually a lot simpler than I thought.  Pd can actually be launched with a -nogui flag, which keeps the gui from opening.  Even more excellently, Pd can be launched with the guiport flag, which tells Pd to listen for input from a GUI outputting to the specified socket. 
> 
> The problem is that I have no idea where to get started on learning how Pd communicates with the GUI.  All I know is that messages are sent back and forth over a socket, typically 5400.  The source code is fairly impenetrable; what would really be nice is if someone could point me towards what I need to look at to figure out how the Pd-GUI message system works.  If there is a guide, or if someone could tell me where to focus my attack on the source code, that would be great.
> 

it is very stupid, as it basically sends tcl/tk draw commands from 
pd-core to pd-gui.

personally, i would _not_ go this route if i were you.
fortunately there are other options available:
- communicate directly with the pd-core via a socket: e.g. using FUDI 
(vanilla [netsend], [netreceive]) or OSC (mrpeach's [packOSC], 
[unpackOSC]) wrapped into TCP/IP or UDP.

you can design your own application layer protocol on top of that, which 
will probably fit your needs better.

OSC would have the added bonus that (in theory) you could use another 
backend than Pd if you feel like it.


fmgasd.r
IOhannes




More information about the Pd-dev mailing list