Large Project Optimization

Hello Community!

My template has slowly grown very big and therefore I need to start doing some optimization to improve performance. It was built in the most basic simplistic way, and I now realize I'm accumulating too many widgets that are very similar or almost duplicates of each other, aside from their midi preags destination.

For example, I have a Panel with 16 tabs. In each tab is an identical set of faders, only difference is each fader is set to a unique midi destination.

Is there a way to have only one tab with a set of faders, and dynamically change the midi destinations or dynamically populate a new set of faders with different ID's and midi settings?

Also, is there a way to disable widgets in the project when I'm not using them and dynamically turn them on and off?

I like the functionality of my setup, but know there is a much better way to achieve what I want to do. I'm now comfortable enough to dig a little deeper into scripting / custom module options, so I'm open for any and all suggestions.

Many thanks in advance for the help!

In addition, I'm also reading about the possibility of reusing the same widgets by just modifying the widgets behavior depending on a switch selector (using advanced syntaxes, scripting and/or the custom module) instead of switching tabs. Can anyone show an example for setting this up?

I'm sharing this patch with you
hope it will help you
You should search in the forum a lot of your question is already answered.
What you are looking for is the concept of increment decrement value.

increment fader.json (30.3 KB)

Thank you so much for your reply and help! I appreciate you sharing your Patch. I will take a look and see if it helps me.

I have managed to create a switch that control visibility and can access the switch with my custom module. This works, but I'm now trying to figure out how to do this all in the Custom Module. I have been searching the forum and found this option for show/hide widgets using the custom module.

In the widget visible property I have:

VAR{visible,true}

In my custom module I have:

receive("/SCRIPT", `setVar("widget_id", "var_id", value)`)

So far this is not working for me, any ideas?

OK, got hide/show working now with the custom module!!
(just needed to be careful with exact spelling)

you can do it without a custom module just with command line in the visibility parameters :

#{@{button_arpSyncMode} == 127 ? "true" : "false"}
1 Like

This is great! Thanks again, I appreciate the help!