[PD] syntax of Pd files

Andy Farnell padawan12 at obiwannabe.co.uk
Tue Oct 16 22:51:41 CEST 2007

Through trial and error I've managed to reach what I thought was
an understanding of Pd file format. However, on deeper analysis
I keep discovering I'm wrong, in fact the Pd file structure and
the syntax of the statements is not what I thought (which explains
many previous programming errors).

I think it's been asked before and received no satisfactory answer,
so once again - Where is the complete file format and syntactic
definitions of the Pd file documented (not by reading through the
source of the parser)?

Would someone care to go through and explain in a simple tutorial
how Pd constructs its netlist and what are the meanings of the 
parameters to each of these statements

#X msg 125 100 bang;

An easy one, a message containing [bang( at coordinates 125 100, right?

#X obj 144 128 s $1-zero;

And again, an object of class "send" at coords 144,128 with name $1-zero.

#X array $1-THREE 6485 float 0;

Maybe an easy one, we create an array called $1-THREE of size
6485 of type float. And an array doesn't need coordinates because a graph
has the coordinates not the array. But what is that 0 at the end?

#N canvas 0 22 450 300 graph1 0;
#X restore 235 308 graph1;

What is the real purpose of restore? What are these parameters? How does
it relate to the canvas?

What the hell is coords? Why?

#X coords 0 1.02 6484 -1.02 200 130 1;

#X connect 60 0 62 0;

Can anyone thoroughly explain connections and how their ordering
is important? It's an ordered adjacency matrix? 

I think this would be very helpful for everyone to have
properly documented somewhere.



Use the source

More information about the Pd-list mailing list