Forums > MaxMSP

open compressed patcher format in max runtime?

May 10, 2008 | 9:35 am


May 10, 2008 | 11:42 am


May 10, 2008 | 12:22 pm


May 10, 2008 | 1:08 pm

On Sat, May 10, 2008 at 1:22 PM, hans w. koch wrote:

> thanks,
>
> but inside the max5 application folder there is a max5 runtime. thats what
> i wanted to use.
> (the website says differently about its existence, i know)
>

Ah I see. I didn’t know about the runtime in the Max5 distribution. I just
tried to load a plain textfile with a compressed format, but that didn’t
work. If .maxpat is the only file format for Max5 and its based on json,
then my guess is its not possible. I’m sure someone else can give you a real
answer;)

Thijs


May 11, 2008 | 7:19 am


May 11, 2008 | 8:14 am

Here is what I found from some experimentation. In the Max 5 runtime, "File>New Text" opens a new text file. If you past a compressed Max 5 patch as text into this document, the runtime automatically converts it to the non-compressed Max 5 format. If you load this patch into Max 5 or MaxRuntime 5 I got the error "patcher file test2.maxpat missing patcher!".

After getting this error I compared the text that was converted from the compressed version by the runtime to the original patch I noticed there was some missing header code I had to manually add to the start of the file. The folowing was inserted after the first "{" and before "‘boxes’":

"patcher" : {
"fileversion" : 1,
"rect" : [ 25.0, 69.0, 640.0, 506.0 ],
"bglocked" : 0,
"defrect" : [ 25.0, 69.0, 640.0, 506.0 ],
"openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
"openinpresentation" : 0,
"default_fontsize" : 11.0,
"default_fontface" : 0,
"default_fontname" : "Verdana Bold",
"gridonopen" : 0,
"gridsize" : [ 10.0, 10.0 ],
"gridsnaponopen" : 0,
"toolbarvisible" : 1,
"boxanimatetime" : 200,
"imprint" : 0,
"metadata" : [ ],

After adding this I got the error:

"error parsing patcher file test2.maxpat
‘,’ or ‘}’ character expected after value for key ‘midpoints’: line=285, char 1, text=’…"midpoints":[]}]}’

I added an extra } to the end of the file (again after comparing with the original) and this time was able to open the file in both Max 5 and MaxRuntime 5.

So it looks like you can use the "New Text" feature of the runtime to uncompress text versions of the patches, but some extra info needs to be added before you can actually open patches made this way.


May 11, 2008 | 8:44 am

wow, thanks for the hack-tip!
and i got it to work too…
greatish!!

h
http://www.hans-w-koch.net

Am 11.05.2008 um 10:14 schrieb Roth Michaels:

>
> Here is what I found from some experimentation. In the Max 5
> runtime, "File>New Text" opens a new text file. If you past a
> compressed Max 5 patch as text into this document, the runtime
> automatically converts it to the non-compressed Max 5 format. If
> you load this patch into Max 5 or MaxRuntime 5 I got the error
> "patcher file test2.maxpat missing patcher!".
>
> After getting this error I compared the text that was converted from
> the compressed version by the runtime to the original patch I
> noticed there was some missing header code I had to manually add to
> the start of the file. The folowing was inserted after the first
> "{" and before "‘boxes’":
>
> "patcher" : {
> "fileversion" : 1,
> "rect" : [ 25.0, 69.0, 640.0, 506.0 ],
> "bglocked" : 0,
> "defrect" : [ 25.0, 69.0, 640.0, 506.0 ],
> "openrect" : [ 0.0, 0.0, 0.0, 0.0 ],
> "openinpresentation" : 0,
> "default_fontsize" : 11.0,
> "default_fontface" : 0,
> "default_fontname" : "Verdana Bold",
> "gridonopen" : 0,
> "gridsize" : [ 10.0, 10.0 ],
> "gridsnaponopen" : 0,
> "toolbarvisible" : 1,
> "boxanimatetime" : 200,
> "imprint" : 0,
> "metadata" : [ ],
>
> After adding this I got the error:
>
> "error parsing patcher file test2.maxpat
> ‘,’ or ‘}’ character expected after value for key ‘midpoints’:
> line=285, char 1, text=’…"midpoints":[]}]}’
>
> I added an extra } to the end of the file (again after comparing
> with the original) and this time was able to open the file in both
> Max 5 and MaxRuntime 5.
>
> So it looks like you can use the "New Text" feature of the runtime
> to uncompress text versions of the patches, but some extra info
> needs to be added before you can actually open patches made this way.
> –
> Roth Michaels
> ————-
> roth@rothmichaels.us
> http://www.rothmichaels.us


Viewing 7 posts - 1 through 7 (of 7 total)