[PD-dev] Hello

Mathieu Bouchard matju at sympatico.ca
Mon Sep 30 06:11:02 CEST 2002

On Sun, 29 Sep 2002, Riccardo Trocca wrote:

> I'd like to know if it is possible (and how) to add a new datatype to 
> PD,

I've been told that is not possible in PureData. However, it is possible
in jMax. 

> A symbol seems to be "just" a string.

It is. It's a permanently allocated constant string... Just like it is in
LISP and many of its apparented languages (Smalltalk, Ruby). 

> Can I add a value a pointer to a data structure?

You wish. Somehow there's a type that is a pointer to a "graphical object"
and nothing else.

> It is possible to build something as audio buffers (image data type, or 
> multidimensional array)?

GridFlow has always passed its multidimensional arrays in a streamed way
(packet-based). Oldest versions did only pass pointers-to-buffers. Latest
versions only pass pointers-to-GridInlets.

For jMax those pointers are encoded as integers. For PureData I actually
had to encode them to pairs of floats (!!!) I've been told that is very
ugly, but I believe that given the circumstances that was the best choice.

> Does that require modifications to PD?

It would, but it's a good idea to avoid that unless the changes go into
the main PD source code.

> The system I'm working on, allows to create a chain of processing on 
> images, then when the system begins to run there is an init phase where 
> each element of the processing chain is told what kind of images it will 
> receive, it initializes itself and its internal buffers, and then starts 
> working everytime it receives data. I think that it is more or less what 
> happens with the audio chain in PD.

Important distinctions:

With the audio chain there is a continuous flow of data; GridFlow uses the
regular message system; Pixonix uses a modified audio chain for its video;
I don't know how other systems do it. 

With the audio chain, the init phase occurs when objects get
connected/disconnected. With GridFlow, the init phase occurs at the
beginning of every grid transmission.

With the audio chain, the total length of the data is not predetermined. 
In GridFlow, dimensions of each grid must be known in advance because of
how the init phase works. 

> Something similar seems to be GridFlow, but I'm having a hard time 
> trying to understand its inner workings.

It's not documented. I wanted to wait till I had a clean API, but it has
not happened yet. (help!)


More information about the Pd-dev mailing list