how to use patch list?

Oct 3, 2008 at 1:51pm

how to use patch list?

Hi,

I keep finding example patches on peoples websites in a sort of list format (see example below). How do I import this to MaxMSP so that I can use it? Also how would I output the same from my own patches?

example:

max v2;
#N vpatcher 140 160 740 560;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 333 191 100 196617 Converts to integer;
#P window linecount 2;
#P comment 333 127 100 196617 bangs H for on , L for off;
#P window linecount 1;
#P newex 263 127 41 196617 sel 1 0;
#P toggle 263 54 60 0;
#P message 278 151 14 196617 L;
#P newex 263 191 40 196617 atoi;
#P message 263 151 14 196617 H;
#P message 224 191 32 196617 print;
#P newex 263 217 71 196617 serial a 9600;
#P window linecount 2;
#P comment 333 75 100 196617 Click here to turn on or off the LED;
#P comment 121 191 98 196617 Click to get a list of the serial ports;
#P connect 7 0 8 0;
#P connect 8 0 4 0;
#P fasten 4 0 5 0 268 178 268 178;
#P fasten 6 0 5 0 283 178 268 178;
#P fasten 3 0 2 0 229 212 268 212;
#P fasten 5 0 2 0 268 212 268 212;
#P connect 8 1 6 0;
#P pop;

#40137
Oct 3, 2008 at 3:11pm

I wondered the same thing when I first saw one of those posted :)

you can simply copy all that text and paste it into a new patcher window in Max, and it magically turns from scary text code (scary for me, at least) into those familiar boxes and patch cords.

Going the opposite way, I think there’s a save as txt option which you can use… there might even be a view as text, but I’m not so sure about that (if not, would that be a useful feature request?).

-Mike

#141736
Oct 3, 2008 at 4:49pm

Great! Thank you.

#141737
Oct 3, 2008 at 6:32pm

indeed, if you copy even just parts of your patch via selection, then paste into any text editor or this forum, voila, code. So it goes both ways. Another neat feature is selecting all or a piece of a patch, copy, then “Paste Picture”, which gives you a pic of your stuff (bounding box just big enough to fit everything).

If and when you upgrade to 5 (highly recommended!), you’d generally use Copy Compressed for transferring text of code, since the new JSON code is a lot more lengthy in how it describes objects than in max 4. So the Compressed makes it much more manageable, though in this case, truly incomprehensible :)

–CJ

#141738

You must be logged in to reply to this topic.