protip: editing max patches as text

Learn about building and using Max for Live devices.
Post Reply
neuromodulator
Posts: 85
Joined: Mon Dec 07, 2009 6:05 am

protip: editing max patches as text

Post by neuromodulator » Sun Apr 03, 2011 7:34 pm

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.

jeremydb
Posts: 64
Joined: Tue Jan 25, 2005 8:20 am
Location: Berlin
Contact:

Re: protip: editing max patches as text

Post by jeremydb » Mon Apr 04, 2011 7:46 am

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

neuromodulator
Posts: 85
Joined: Mon Dec 07, 2009 6:05 am

Re: protip: editing max patches as text

Post by neuromodulator » Tue Apr 05, 2011 6:29 pm

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).
Last edited by neuromodulator on Tue Apr 05, 2011 6:49 pm, edited 1 time in total.

chapelier fou
Posts: 6025
Joined: Mon May 15, 2006 12:15 pm

Re: protip: editing max patches as text

Post by chapelier fou » Tue Apr 05, 2011 6:36 pm

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:
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1

Post Reply