L+R Channel Volume link button
-
Hello friends, I'm trying to make 2 volume sliders to control the volume of L and R channels. I scripted the link button and it works great but as soon as I link the sliders to the dedicated controls in scriptnode the link button stops working. Am I missing something?
const var Lslider = Content.getComponent("Lslider"); const var Rslider = Content.getComponent("Rslider"); const var LRlink = Content.getComponent("LRlink"); inline function onLsliderControl(component, value) { if (LRlink.getValue()) { Rslider.setValue(value); Rslider.changed(); } }; Lslider.setControlCallback(onLsliderControl); inline function onRsliderControl(component, value) { if (LRlink.getValue()) { Lslider.setValue(value); Lslider.changed(); } }; Rslider.setControlCallback(onRsliderControl);
-
@kekient Linking the controls using the interface designer take precedence over the scripted callback. You'll have to script the linking of the sliders AND the scriptnode parameters handling.
-
@Matt_SF thank you so much
-
@kekient I recommend playing around with broadcasters. They're meant for exactly this sort of situation - controlling multiple things at once from a callback function.
This is currently my area of exploration too, and making good progress with it.