[PD] interface/pd-based standalone applications question

Mathieu Bouchard matju at artengine.ca
Wed Jul 7 03:44:01 CEST 2010


On Tue, 6 Jul 2010, David Schaffer wrote:

> My original question was: how to build graphical user interfaces for pd 
> patches that would look more like standard software

Here's an example for you. Here is the serveur.pd patch, which you will 
start first :

#N canvas 0 0 450 300 10;
#X obj 7 5 netreceive 23456;
#X obj 7 24 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1;
#X connect 0 0 1 0;

and here is piton.tcl, which you will then run, using the "wish" command :

set tibas [socket localhost 23456]
fconfigure $tibas -buffering line
button .b -text "hello, how are you?" -command {puts $tibas "bang;"}
pack .b -padx 10 -pady 10

and then you click on the button of the latter programme and it will 
activate the bang button in the former programme (patch).

you can replace "localhost" by any recognised hostname that the server 
patch may be running on, and change the port number to whatever agreed 
upon by both programmes.

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard, Montréal, Québec. téléphone: +1.514.383.3801


More information about the Pd-list mailing list