Page 1 of 1

protip: editing max patches as text

Posted: Sun Apr 03, 2011 7:34 pm
by neuromodulator
I don't know if this is so obvious that it's ridiculous that I'm suggesting it to people as a tip, but I thought maybe it was worth sharing. I save myself hours sometimes when I'm building iterations of something by editing the max patch with a text editor and "find and replacing" my key variables.

Hope that's useful to someone.

Re: protip: editing max patches as text

Posted: Mon Apr 04, 2011 7:46 am
by jeremydb
neuromodulator wrote:I don't know if this is so obvious that it's ridiculous that I'm suggesting it to people as a tip, but I thought maybe it was worth sharing. I save myself hours sometimes when I'm building iterations of something by editing the max patch with a text editor and "find and replacing" my key variables.

Hope that's useful to someone.
We do this, too, sometimes. Find/replace in a text editor can be a huge timesaver when making modifications like this.

However, don't try this with M4L Devices: although they are mostly text, they contain some special chunky binary sauce which will break if you change the size of the text portion of the file. If you're handy with a hex editor, you can probably figure out how to fix the file, but I would recommend that you only edit devices in the Max editor.

Jeremy

Re: protip: editing max patches as text

Posted: Tue Apr 05, 2011 6:29 pm
by neuromodulator
Oh, I figured that out. When I'm working in M4L, I do this:

1) Select and copy all the objects in the patch you want to edit.
2) Open a new max file.
3) Paste in all your objects.
4) File --> Save As whatever, wherever you can find it (I just always call it temp and save to desktop).
5) Edit "temp" with desired text editor.
6) Select all text within the text editor, copy.
7) Back to Max, File ---> New from Clipboard.
8) Select all the objects in the new patch, copy and paste into the M4L patch. Bingo.

It sounds complicated but it's hella quick once you've got it down (command-a, command-c, command-n, command-v, command-s, "temp", to desktop, right click to "open with", command-f, "enter find and replace strings", enter, command-a, command-c, command-tab, file menu "new from clipboard", command-a, command-c, command-tilde until back to m4l patch, command-v).

Re: protip: editing max patches as text

Posted: Tue Apr 05, 2011 6:36 pm
by chapelier fou
neuromodulator wrote:(command-a, command-c, command-n, command-v, command-s, "temp", to desktop, right click to "open with", command-f, "enter find and replace strings", enter, command-a, command-c, command-tab, file menu "new from clipboard", command-a, command-c, back to m4l patch, command-v).
:lol: