How to design with 3 sliders update together with different scale


#1

Hi all,

I am doing working with 3 sliders update together. When one change, the others will update too with different value.

Please suggest me best design and what method is best (Timer, SynUpdate, …)

Thanks


#2

I think I would start with determining how the associated parameters are related (assuming they are) then consider how to display that to the user.


#3

Thanks for your reply.
Here is my idea:

I have a panner with a red dot contains 2 values X and Y
X, Y are also slider too.
And I have more 2 variable refer to x,y is phase(from 0- 360) and distance (from the central of panner to the red dot.) . So the two new variables are also slider too.

And they update each other when i change a slider.

Please help me.

Thanks so much.


#4

If I’m understanding correctly when one of your slider values changes you want to update the other two sliders with new values? If so then you’ll want to implement the sliderValueChanged method from the Slider::Listener class by inheriting from Slider::Listener in your slider’s parent component. You can then register your parent component as a listener to each of the 3 sliders using the setListener function and in sliderValueChanged you can check which slider has been changed by comparing the address of your sliders to the argument of the function and then change the other 2 slider values appropriatey using the Slider::setValue function.


#5

Thanks for your reply,

My current code is that:
First i make you clear my working.

Because X and Y related to Rotation and Center (Distance from the a point (X, Y) to center.).

When you change R or C the X Y change too.
I created 2 functions convert RC to XY and XY to RC.

Now i can solve with update on GUI. X Y change i draw the point and update R/C. R/C change i update XY and Point.

I provider 2 variables on Audio processor for automation.

I am crazy with automation.

Please help me with automate too.
I tried with ValueTree but failed.

how much ways can you update from Audio Processor parameter to Editor?

How do we know which parameter is in Automate mode?
Now i use the X, Y as 2 parameters in automation mode. Then we have to update R,C and draw the point and update all sliders too. (how to avoid recursive). do it same with R/C.

I ll update the image on there for you all.

Thanks.