[PD-dev] PD patches in XML
Georg Holzmann
grhPD at gmx.at
Thu Dec 9 14:43:24 CET 2004
Hallo list!
I know this topic was discussed ago, but as I was thinking about PD and
XML I (maybe) wanna make an external for saving and opening PD patches
as XML files.
The advantages of XML would be (as anyone of you knows):
- PD patches could be merged into the CVS
- it would be easy to write PD-patches in a XML editor (so e.g. it also
would be possible for blind people to write PD-patches - and at least in
Graz I know a blind man who wants to try PD ...)
- could be displayed in browsers with different style sheets
- (and of course many more ...)
So I made a first simple example for now - just to start the discussion
(if anyone is interested):
---------original-patch------------------------
#N canvas 828 549 450 341 10;
#X obj 49 134 print;
#X msg 49 45 bang;
#X obj 49 105 f 2;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
-----------------------------------------------
---------in-xml--------------------------------
<canvas xpos="828" ypos="549" height="450" width="341">
<obj ID="obj0" xpos="49" ypos="134"> print </obj>
<msg ID="msg0" xpos="49" ypos="45"> bang </msg>
<obj ID="obj1" xpos="49" ypos="105"> f 2 </obj>
<!-- should 2 be an extra tag for init arg ? -->
<connect>
<outlet ID="msg0"> 0 </outlet> <!-- is this good? -->
<inlet ID="obj1"> 0 </inlet>
</connect>
<connect>
<outlet ID="obj1"> 0 </outlet>
<inlet ID="obj0"> 0 </inlet>
</connect>
</canvas>
-----------------------------------------------
short explanation: every object or message gets an ID and with that ID
it's possible to connect all the objects - but it's only a first trial.
LG
Georg
More information about the Pd-dev
mailing list