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

Aug 20, 2011 at 10:43pm

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

hi,
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!
karl

#58569
Aug 20, 2011 at 11:10pm

paste replace

#210537
Aug 20, 2011 at 11:12pm

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.

#210538
Aug 21, 2011 at 12:08am

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

#210539

You must be logged in to reply to this topic.