[PD-dev] Fwd: per-thread storage in Pd in support of pdlib - discussion?

Peter Brinkmann peter.brinkmann at googlemail.com
Sun Feb 5 06:46:40 CET 2012


On Sat, Feb 4, 2012 at 10:20 PM, Hans-Christoph Steiner <hans at at.or.at> wrote:
> The way I see the "editing API" is the converse of the pd-gui --> pd
> communications: pd messages.  My approach is to do it bit by bit.  Take a
> chunk of the current pd-gui --> pd communications and refactor into
> something that looks like a pd message (Tcl proc calls can look the small,
> luckily, the syntax is similar in some basic ways).

Agreed.  It's pretty clear how to express most pd-->pd-gui
communications in terms of regular messages.  The only parts I'm
unsure about are arrays and data structures.  I sort of see a solution
for arrays: When an array changes, send a message that consists of the
name of the array and a pair of indices that delimit that range that
has changed, and then the GUI can read out the relevant part of the
array (libpd already includes an API call for that).

I don't really know data structures in Pd, but I suspect that a
similar approach might work, except that we would need to add an API
call for reading and writing data structures.
Cheers,
     Peter



More information about the Pd-dev mailing list