[PD-dev] Messaging between Pd and GUI

IOhannes m zmoelnig zmoelnig at iem.at
Mon Jun 9 09:00:00 CEST 2008


Tarakajian, Samuel wrote:
> I think what I'm going to do is launch Pd with the -nogui flag and then send messages to the core through the socket connection.  From launching pd with the debug flags it seems to me as if pd-gui communicates with the core not by sending actual, meaningful messages (like "obj 0 0 someobject 0") but rather by actually sending all the mouse movement and keystrokes, which I"m assuming the pd-core then uses to figure out what objects to create and so on.  I do not want to emulate this; instead I'd like to communicate with the pd-core with the more meaningful messages that can be used to control pd sans gui (like those at the end of g_canvas.c).  Does anyone know where I can find a list of all these messages and their input/output?  That would be swellcakes.
> 

i still do not understand why you would want to do such a thing.
the communication between pd and pd-gui is really low-level tcl/tk (this 
is what i meant by "stupid").
why would you want to intercept that?
what is wrong with using "meaningful" messages (like "obj 0 0 f 100;") 
or even higher-level "cue 3, maingain 0.9;" ?

as i have understood it, you are trying to create a specific application 
with a special gui & you are not trying to hook a different patcher 
front-end to the pd-core. but as soon as you go into sys_vgui() you are 
really dealing with the latter.

furthermore, all the sys_vgui will be suppressed when running Pd with 
"-nogui", so your entire interception idea might be void... (all right, 
i remember you talking about using the "-guiport" flag, which will help 
you here).


people have done great things by just using [netsend]/[netreceive] or 
OSC (e.g. the reacTable* is built that way; it really allows you to 
dynamically _patch_ using a haptic interface (so it kind of replaces the 
pd-gui) and still does not go the interception-way you want to use (i 
guess, because this is so awkward).


finally, from my experience with intercepting the pd/pd-gui connection 
(done in the "peer data / multipd" project, the connection API keeps 
changing! so your app might work with Pd-0.40 and not with Pd-0.41; it 
might work with Pd-extended-0.40, but not with Pd-vanilla-0.40.


fgamsdr
IOhannes




More information about the Pd-dev mailing list