Quick way to change a name in multiple objects
Hello!
I'm building a Max patch with OSCtouch.
I've build a patch around a toggle object for OSCtouch.
Now I want to copy this whole patch and make it do the same for a second toggle object in OSCtouch.
Is there a quick way to change a certain command to another one in lots of objects?
I used the /1/toggle1/ a lot of objects. Do I have to manually rename all the objects to /1/toggle2/ or is there an easier way?
Greetings,
RTD
Yes! if they are all the same.... edit -> 'paste replace' is your friend.
ex. if you made a bunch of [route /1/toggle1] objects, copy them somewhere. Then create a single [route /1/toggle2] object, copy it, select all of your [route /1/toggle1] copies and use option-command-v (mac) or alt-control-v (windows) to 'paste replace'. That will replace all of the selected objects with your copied object. You can do this with most objects.. Best of all.. if the objects have the same number of inlets/outlets, all of the patch cords will remain connected.
If you need to make a bunch of objects with different arguments, you have to mess around with scripting. Here is an abstraction I made to create dozens of subpatches - each with 64 objects and each object with a different argument. It's a bit clumsy but it works.
-
copy and paste your patch in a decent text editor, and find-replace all your [route /1/toggle1] with the desired [route /1/toggle2].
copy and paste the new version into a patcher.
voila !