[PD-dev] Messaging between Pd and GUI

Tarakajian, Samuel Samuel_Tarakajian at brown.edu
Wed Jun 4 17:00:42 CEST 2008


That's exactly what I was hoping to do: communicate with the Pd core though a socket connection.  The real question is how to do that.  Setting up the connection is easy, but I have no idea what kind of messages Pd core is expecting.  Is there a list somewhere?

-Sam

-----Original Message-----
From: IOhannes m zmoelnig [mailto:zmoelnig at iem.at]
Sent: Wed 6/4/2008 2:44 AM
To: Tarakajian, Samuel
Cc: pd-dev at iem.at
Subject: Re: [PD-dev] Messaging between Pd and GUI
 
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