Initial Comment:
Hi all !
With several people from *libpd* and other *pd* offsprings, we have been thinking that it would be great to have an alternative format for pd files (see:
http://noisepages.com/groups/pd-everywhere/forum/topic/javascript-json-apis/).
Problem is that the current format is very tedious to parse ; it is very messy (as seen in the complexity of the documentation) ; and last but not least, it doesn't separate the actual graph data from the GUI data (X, Y, canvases, ...). Overall, this is not good for interoperability between different pd/non-pd systems.
We were thinking that a simple JSON file would save a lot of trouble :
- it has a nested structure, which allows for much clearer, even human-readable format. ex :
[
{"class": "obj", "id": 0, "type": "osc~", "args": [440]},
{"class": "obj", "id": 1, "type": "dac~"},
{"class": "connect", "from": [0, 0], "to": [1, 0]},
{"class": "connect", "from": [0, 0], "to": [1, 1]}
]
- it allows putting custom attributes (for a GUI for example) :
[
{"class": "obj", "id": 0, "type": "osc~", "args": [440],
"myGui": {"x": 123, "y": 78}
}
]