Login / Register 0 items | $0.00 New @ KVR
trecords
KVRer
 
4 posts since 24 Jun, 2011

Postby trecords; Sun Aug 05, 2018 1:23 pm Linked parameters

Hi everyone!

Please advise me how to do that. There are two parameters in my plugin, named "Left" and "Right". Also I have a "Link" button. I want to change these two parameters simultaneously when the "Link" button is pressed. I.e. when I move the "Left" slider, the "Right" slider have to move simultaneously with the "Left" slider or vice versa.

Thanks.
Squidsneeze
KVRist
 
48 posts since 3 Nov, 2015, from Germany

Postby Squidsneeze; Sun Aug 05, 2018 1:29 pm Re: Linked parameters

Set the value of the other slider's parameter to the value of the dragged one whenever it got moved. Then trigger an editor redraw.
User avatar
Audiority
KVRian
 
712 posts since 15 Nov, 2005, from Italy

Postby Audiority; Fri Aug 10, 2018 1:50 pm Re: Linked parameters

you must do that asynchronously, otherwise most DAW will basically "explode". I used a sort of "semaphore" that sets a parameter busy. In this way both parameters cannot be changed in the same instant, avoiding wormholes.
Progsounds | Audiority | Epic SoundLab
Need a Kontakt scripter? Contact me.
mystran
KVRAF
 
4955 posts since 11 Feb, 2006, from Helsinki, Finland

Postby mystran; Sat Aug 11, 2018 1:56 am Re: Linked parameters

Another possibility (that seems a whole lot less likely to cause issues): when your "linked" parameter is active, you just use one of the parameters for both channels and ignore the other. You can do this in both your custom GUI (treat both sliders as mapped to the same parameter when linked) and your audio code.

This way you eliminate any possibility that the parameters are out of sync, since you're not using the other one at all while linked. You could still change (and send parameter changes to the host for) the other parameter value too if you wanted to, but whether this stays exactly in alignment is no longer an issue if the actual "linking" is done by ignoring the parameters for the second channel.
Image <- plugins | forum

Moderator: Moderators (Main)

Return to DSP and Plug-in Development