dealing with a large, slow GUI
Hi guys
I've built a probability based sequencer for a project I'm working on. It works perfectly apart from the fact that the GUI is a grid of 16x32, so 512 live.dials. When changing presets, so changing the values of the 512 dials all at once its REALLY sluggish. I've built the patch in a way that this doesn't affect the timing, as the GUI is only responsible for input and display, but it makes the patch difficult and frustrating to work with. I know this is a lot of dials, but it's what is needed for this project...
Is there any way to improve this? Or is there a better way of doing it? For example, if I used jsui and coded a single UI object with the 512 dials, would this be quicker than 512 separate objects. How is the multi slider coded, in c? It had no problems changing 512 values at once, with no noticeable latency.
Has anyone else come up against this same problem?
This isn't the GUI for my sequencer as it's not easy to separate the GUI from the rest of the patch and still be able to demonstrate, but it shows the issue.
This is the dial example. I wouldn't let me use the copy compressed text...
Try matrixctrl with dial mode
Thanks for the reply. That's the first thing I tried. It's even worse that way. Even turning the dials when there are that many is totally unusable.
in JSUI u will notice performance issues as well if we are talking about so many objects and resolution that they require . There is a way to gain better results with temporal painting into the Image instance .
As u need to update state of one particular knob that is in use ,u dont need to redraw all the rest with all their calculations . In order to do this you would store Last state of all your knobs into Image instance and draw them as a picture together with your knob that u are dealing with at this very moment .
It means that you would draw only one knob at the editing time ,where all the rest would be displayed as a picture .
i dont think there is any other/simpler way to deal with efficiency at the moment
OK, so it's to do with drawing that many images at once which is why the matrixctrl is slow with any task at that resolution, and with the live.dial it's quick to move one, but slow changing presets, as then I have exactly the same issue. Redrawing everything.
I would assume that going down the JSUI route, I'm most likely going to end up with the same performance issue as I now have with live.dial? No performance issue moving one, but lag when all of the dials need to be redrawn?
I've just had an idea. I'm not using any of the max preset objects in my patch. I'm storing and retrieving all the data with coll. I can probably get around this by checking to see if the values are different and only changing the dials that need to be changed. Because most of the dials in every preset are set to 0. I'll let you know how I get on.
You may needs additional works.
if your data look likes table (e.g.. has row ,columns or matrix as Max said)
try to uses kind of jit.matrix, coll, dict etc.. to store & calculate the data send those data to your destination (Audio, MIDI, ...) and then update GUI objects.
anyway 512 dials on screen at once seems too much and I think it's always effect your computer performance;