Find and Replace

gwsounddsg's icon

So I'm working on a really big patch which contains many different abstractions I have built to assist in reducing the amount of editing time. I've recently been working on an update and have found that I need to change most of my abstractions, BUT I want to keep the previous abstractions.

Granted I could save them with a prefix (ie: MyAbstraction becomes OldMyAbstraction). But I want to keep the integrity of the older patch. So I find myself replacing 48 abstractions with different arguments 5 or 6 times. Its exhausting.

I was wondering Cycling74' folks, could you guys work on a "find and replace" feature? It would be amazing and cut down on mindless programming and let the programmer focus on the important things in life.

Cheers
GW

Roman Thilenius's icon

bitchslap me if that does not work on max 5, but on max 4 the common way
how to archive this (replace dozens of abstractions or objects) was to save
AS TEXT and then use bbedit or similar text-programs to replace the string
"abstraction" with "abstarctions2".

on my mac os 9 computer this takes abput 3-4 seconds and the change is done.

-110

Chris Muir's icon

Max5 patcher are text files, specifically .json files. You may need to do something to convince your text editor that filename.maxpat is a file it can open, but you can probably figure out the .json formatting once that's done.

cap10subtext's icon

I do this all the time with Textedit. I just make sure that the number of inputs and outputs remains consistent and that there are no unpleasant surprises.

For example when if I needed to add an attribute to 52 jit.qt.movies I just look for all instances of jit.qt.movie 320 240 and find and replace that text with jit.qt.movie 320 240 @unique 1.

Ben Bracken's icon

I use TextWrangler for this all of the time. It has a good find/replace across multiple documents.

-Ben