Forums > MaxMSP

small ui question: converting number boxes into (int) without rewiring?

August 20, 2011 | 10:43 pm

just a really short question: i have a rather big and densly build patch and try to optimize it for performance by reducing onscreen ui elements.
eg. i want to convert a lot of number boxes into (int) or (float). is there any way to do so without having to drag all their connections anew?
thanks for your help!

August 20, 2011 | 11:10 pm

paste replace

August 20, 2011 | 11:12 pm

copy the bits of your patch you want to convert and paste them into a text editor and then do a search and replace

ie this:
"maxclass" : "flonum",
"numinlets" : 1,
"numoutlets" : 2,

would be replaced with this:
"maxclass" : "newobj",
"text" : "f",
"numinlets" : 2,
"numoutlets" : 1,

and this:
"outlettype" : [ "float", "bang" ],

would be replaced by this:
"outlettype" : [ "float" ],

you might want to encapsulate the objects you want to change as a way of isolating them, then de-encapsulate afterwards.

I’ve never done this myself so let me know if it works: it may be just as fiddly as doing it by hand

EDIT : well I never knew about paste replace… thanks Chris, my suggestion is ridiculously complicated compared to paste replace.

August 21, 2011 | 12:08 am

cool, thanks!
paste replace is awesome and exactly the thing i was looking for.

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP