I’d like to update one control and its respective parameter when another is clicked, but I can’t find a good way to do this. Specifically, when a knob that controls a synthesis parameter is clicked, the sliders that control the strength of each of the modulators should change their values to those that correspond to the parameter of the control that was clicked. (e.g. Filter cutoff is modulated by 50% of its range by Envelope 1, so when the Filter Cutoff knob is clicked, the Envelope 1 modulation depth moves to 0.5.) I tried calling GetUI()->GetControlWithTag(kCtrlTag)->SetValueFromDelegate(val) from the MetaParamTest example or GetDelegate()->SendParameterValueFromDelegate(paramIdx, val) in the knob click event, but these only change the position of the slider handle and not the label - and from what I can tell, they don’t update the parameter either.
Another possibility would be creating parameters for every modulatable parameter in turn, storing the modulation depth for each modulator for that parameter, and then changing the parameter index of the depth slider. However, this unfortunately didn’t work either.
I think the function I want is SetParameterValue, but I can’t figure out how to call it, since I don’t know which object in the program is of type IPlugAPIBase. (I’m rather new to C++ and am still figuring out the IPlug class hierarchy)
Thanks in advance!