Linked parameters

SDK for VST 3 audio plug-in and host development.
trecords
Posts: 2
Joined: Sun May 06, 2018 10:26 am

Linked parameters

Postby trecords » Sun Aug 05, 2018 9:16 pm

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.

pongasoft
Posts: 29
Joined: Sun Mar 11, 2018 5:57 pm

Re: Linked parameters

Postby pongasoft » Tue Aug 07, 2018 1:23 pm

I am not sure if this is the best way or if there is better solution but something which should work:

- in the processing code, you keep track of the link state (you use data.inputParameterChanges to keep track of this state when it changes)
- you also detect using data.inputParameterChanges that the left or right control parameter has changed
- when you detect that one of them has changed and the link flag is true, then you change the other one by writing it to data.outputParameterChanges

Example of code using data.inputParameterChanges https://github.com/pongasoft/jamba/blob ... te.cpp#L52

Example of code using data.outputParameterChanges https://github.com/pongasoft/jamba/blob ... er.cpp#L29

There may be another solution using a sub controller but I have never used it.

Yan


Return to “VST 3 SDK”

Who is online

Users browsing this forum: No registered users and 1 guest