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).
See Attributes Common to All Elements.
Name | Value Type | Default Value | Description | Comment | V. | Exp. |
---|---|---|---|---|---|---|
from |
Empty |
Identifier of the origin parameter. |
Mandatory |
1.1 |
No | |
to |
Empty |
Identifier of the target parameter. |
Mandatory |
1.1 |
No | |
response_curve |
linear |
Response curve: the value of the source parameter is modified by the curve before being set on the destination parameter. |
|
1.1 |
No | |
formula |
empty |
Formula to transform the from parameter into the to parameter. Acts as a custom response curve. |
This attributes overrides the "response_curve" attribute when set. The formula cannot reference external model data but 'x' (value of the 'from' param) and can only use built-in functions. If you want to reuse functions or parameters defined in the skin, please use the FORMULA_PARAM element instead. |
1.7 |
No | |
reverse |
'false' |
Reverse the response curve. |
If the curve is normalized, the transfer function of the link is: to=1-f(from), else it is: to=max-f(from) (f being the response curve) |
1.1 |
1.2 | |
normalized |
'false' |
Links the normalized values of the parameters instead of the absolute values. |
Set this parameter to true if you want to link the parameters relatively to their ranges, and not as absolute values. 'Normalized' values are set between 0 and 1, 0 corresponding to the minimum and 1 the maximum values of the parameters |
1.2.1 |
No | |
enabled |
'true' |
Enables or disables the link. |
|
1.1 |
1.2 | |
mode |
'absolute' or 'diff' |
'absolute' |
Chooses the operation mode of the link: in 'absolute' mode the value of the destination parameter is synchronized with the value of the input parameter (according to other settings such as response curve). When diff mode is set, the link incrementally modifies the value of the pointed parameter based on the input parameter variations. |
This parameter is exposed as an integer (0 matching to 'absolute' mode and 1 to 'diff' mode). |
1.3.2 |
1.3.2 |
<?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>
<?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>