Find and Replace

Apr 30, 2011 at 6:39pm

Find and Replace

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

#56735
Apr 30, 2011 at 7:12pm

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

#203313
Apr 30, 2011 at 8:44pm

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.

#203314
Apr 30, 2011 at 9:31pm

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.

#203315
Apr 30, 2011 at 10:45pm

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

-Ben

#203316

You must be logged in to reply to this topic.