Feature Requests item #3531000, was opened at 2012-05-30 23:49 Message generated for change (Tracker Item Submitted) made by ouiouaa You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478073&aid=3531000...
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Priority: 5 Private: No Submitted By: Sébastien Piquemal (ouiouaa) Assigned to: Nobody/Anonymous (nobody) Summary: Proposal for an alternative file format
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} } ]
- icing on the cake, there's good JSON libraries in every language... so no need to write custom parsers, and it would be straightforward to implement APIs (for example for some dynamic patching) based on that format.
Of course, for a start, there would need to be support for both file formats. But I am volunteering to write a converter .pd <-> .json as a small standalone tool.
So ... would this interest any of you !?
Sébastien
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=478073&aid=3531000...