PARAM_LINK
Page is not ready
This article contains information from the official Blue Cat Audio KUIML reference that was not yet verified and edited.
This element connects a parameter to another one: whenever the 'from' parameter changes, the 'to' parameter takes the 'from' parameter value (modified by the 'response_curve' or 'formula' attribute if any).
Attributes brief detailed show all inherited
See Attributes Common to All Elements.
Specific Attributes
Examples
- The following example creates a link between the values of two controls: whenever the control1 slider changes, the control2 slider will change as well:
- <?xml version="1.0" encoding="utf-8" ?>
- <SKIN language_version="1.1" layout="row">
- <IMAGE_PARAM_SLIDER image="slider.bmp" thumb_image="thumb.bmp" param_id="dsp.input1" id="control1" />
- <IMAGE_PARAM_SLIDER image="slider.bmp" thumb_image="thumb.bmp" param_id="dsp.input2" id="control2" />
- <PARAM_LINK id="link" from="control1.value" to="control2.value" />
- </SKIN>
-
We can also have a bidirectional link so that control1 also moves when control2 is moved:
- <?xml version="1.0" encoding="utf-8" ?>
- <SKIN language_version="1.1" layout="row">
- <IMAGE_PARAM_SLIDER image="slider.bmp" thumb_image="thumb.bmp" param_id="dsp.input1" id="control1" />
- <IMAGE_PARAM_SLIDER image="slider.bmp" thumb_image="thumb.bmp" param_id="dsp.input2" id="control2" />
- <PARAM_LINK id="link" from="control1.value" to="control2.value" />
- <PARAM_LINK id="link2" from="control2.value" to="control1.value" />
- </SKIN>
- We can also create a button that will control the link activation. The button just references the link 'enabled' exposed attribute.
- <?xml version="1.0" encoding="utf-8" ?>
- <SKIN language_version="1.1" layout="row">
- <IMAGE_PARAM_SLIDER image="slider.bmp" thumb_image="thumb.bmp" param_id="dsp.input1" id="control1" />
- <IMAGE_PARAM_SLIDER image="slider.bmp" thumb_image="thumb.bmp" param_id="dsp.input2" id="control2" />
- <IMAGE_PARAM_BUTTON image="button.bmp" param_id="link.enabled" id="button" />
- <PARAM_LINK id="link" from="control1.value" to="control2.value" enabled="false" />
- </SKIN>
The control1 slider will be linked to the control2 slider only when the button has been pushed.
-
Back to the 2 links example, we can control both of them with a single button if we create an intermediate boolean parameter that holds the value (0 or 1, which corresponds to 'false' or 'true') and is linked to both links 'enabled' parameter:
- <?xml version="1.0" encoding="utf-8" ?>
- <SKIN language_version="1.1" layout="row">
- <!-- controls -->
- <IMAGE_PARAM_SLIDER image="slider.bmp" thumb_image="thumb.bmp" param_id="dsp.input1" id="control1" />
- <IMAGE_PARAM_SLIDER image="slider.bmp" thumb_image="thumb.bmp" param_id="dsp.input2" id="control2" />
- <IMAGE_PARAM_SLIDER image="button.bmp" param_id="linksActivation" id="button" />
- <!-- control links -->
- <PARAM_LINK id="link" from="control1.value" to="control2.value" enabled="false" />
- <PARAM_LINK id="link2" from="control2.value" to="control1.value" enabled="false" />
- <!-- control links activation -->
- <PARAM type="boolean" max="1" name="activate links" id="linksActivation" />
- <PARAM_LINK from="linksActivation" to="link.enabled" />
- <PARAM_LINK from="linksActivation" to="link1.enabled" />
- </SKIN>