Specification for .maxpat JSON format?

Peter Seibel's icon

Is there a specification for how patches are represented in JSON? I.e. if I wanted to build tools that understood or generated patches in JSON format, is there something that specifies the structure of the JSON?

Amit Sen's icon

Hi Peter!

I have tried to reverse engineer the JSON format used by MAX. Also, I just found a python library – py2max– that facilitates the programmatic creation and manipulation of Max/MSP patches by providing a Python interface to generate .maxpat files. I haven't tried it though.

I don't know if Cycling74 wants this format to be public though, so I'm hesitant to share it here. But if you send me a way to DM you I'm happy to share what I find. I managed to auto generate some simple MAX patches with an AI. Primitive, but kind of cool.