CURVE_LINK
This element connects a curve to another one. This means than whenever the 'from' curve changes, the 'to' curve takes the 'from' curve value.
Attributes brief detailed show all inherited
| Name | Description | Default | |||
|---|---|---|---|---|---|
| from | Identifier of the origin curve | empty | |||
| to | Identifier of the target curve | empty | |||
| enabled | Enables or disables the link | 'true' | |||
| Common attributes | |||||
| id | Identifier of the element | empty | |||
Examples
Here's an example of a CURVE_LINK used to copy data from CURVE_FROM_PARAM_OVER_TIME into a newly created CURVE. The new curve has different max/min values, and the link can be "disabled" to "pause" the curve, without pausing the original (source) CURVE_FROM_PARAM_OVER_TIME.

- <!-- demo param -->
- <PARAM id="demo_param" min="-10" max="10" default="0" />
- <!-- source curve from param over time -->
- <CURVE_FROM_PARAM_OVER_TIME id="curve_source" param_id="demo_param" duration_ms="10000" refresh_time_ms="10"/>
- <!-- target curve -->
- <CURVE id="curve_demo" x_default="0" x_max="0.5" x_min="-5" x_unit="s" y_default="0" y_max="7" y_min="-7" y_unit="dB" />
- <!-- copy data from source curve to target curve -->
- <CURVE_LINK id="curve_link_1" from="curve_source" to="curve_demo" enabled="true" />
- <!-- we can "pause" the target curve without pausing sampling the values for the original CURVE_FROM_PARAM_OVER_TIME -->
- <PARAM_TEXT_CONTROL param_id="curve_link_1.enabled" content="Link: {text_value}" />
- <!-- display the curve on a graph -->
- <PNS_LCD_GROUP_BOX>
- <!-- grid -->
- <GRID id="grid_1" width="100%" height="100%" x_positions_count="11" x_subdiv_count="1" y_positions_count="3" y_subdiv_count="3" color="#CCCCCC" subdiv_color="#999999" origin_color="#FFFFFF" line_width="2" subdiv_line_width="1" origin_line_width="3" x_param_info_id="curve_demo.x_info" y_param_info_id="curve_demo.y_info" opacity="0.2" />
- <!-- first graph for the line (stroke) -->
- <CURVE_GRAPH curve_id="curve_demo" width="500" height="200" color="#327ca3" graph_style="stroke" opacity="1" line_width="4" />
- <!-- second line for the opaque bargraph -->
- <CURVE_GRAPH curve_id="curve_demo" width="500" height="200" color="#327ca3" graph_style="bargraph" opacity="0.2" line_width="4" />
- <!-- horizontal ruler -->
- <RULER id="graph_ruler_x" orientation="horizontal" width="100%" value_suffix="false" param_info_id="curve_demo.x_info" color="#AAAAAA" value_format=".1" content="{value}" positions_count="11" font_escapement="0" text_h_align="center" v_offset="0" v_align="bottom" h_offset="-1" font_size="12" />
- <!-- vertical ruler -->
- <RULER id="graph_ruler_y" orientation="vertical" height="100%" width="50" value_suffix="false" param_info_id="curve_demo.y_info" color="#999999" value_format=".1" content="{value}" positions_count="3" font_escapement="0" text_v_align="top" h_align="left" text_h_align="left" h_offset="3" v_offset="0" font_size="12"/>
- </LAYER_STACK>
- </PNS_LCD_GROUP_BOX>
- <!-- demo logic -->
- <SCRIPT script="double demo_val = 0;" />
- <TIMER id="forever_timer" refresh_time_ms="5" />
- <ACTION_TRIGGER event_id="forever_timer.elapsed"
- script="
- demo_param = sin(demo_val)*5 + cos(demo_val*0.2);
- demo_val+=0.09;
- " requires="demo_param;demo_offset;" />
Related elements
See CURVE_GRAPH, CURVE_FROM_PARAM_OVER_TIME, FORMULA_CURVE, CURVE, CURVE_MULTI_LINK.
Comments
Please, authorize to view and post comments.