PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
  • Overview
  • Tutorial
  • Reference
Layout and positioning
  • CELL
  • TABLE
Language basics
  • SKIN
  • DUMMY
  • INCLUDE
  • INCLUDE_ONCE
  • DEFINE
  • UNDEFINE
  • VARIABLE
  • LOCAL_VARIABLE
  • TEMPLATE
  • TEMPLATE_INNER_CONTENT
  • TEMPLATE_UNLOAD
  • REPEAT
Text widgets
  • TEXT
  • TEXT_FIELD
  • TEXT_EDIT_BOX
  • TOOLTIP
  • PARAM_TEXT
  • PARAM_TEXT_CONTROL
  • PARAM_TEXT_EDIT_BOX
  • PARAM_TOOLTIP
Image widgets
  • IMAGE
  • IMAGE_ACTION_BUTTON
  • IMAGE_GROUP_BOX
  • IMAGE_PARAM_BUTTON
  • IMAGE_PARAM_KNOB
  • IMAGE_PARAM_LINEAR_METER
  • IMAGE_PARAM_MENU_BUTTON
  • IMAGE_PARAM_METER
  • IMAGE_PARAM_SLIDER
  • IMAGE_PARAM_TOGGLE_SWITCH
  • XYZ_IMAGE_PARAM_JOYSTICK
Invisible controls
  • INVISIBLE_ACTION_BUTTON
  • INVISIBLE_PARAM_BUTTON
  • INVISIBLE_PARAM_KNOB
  • INVISIBLE_PARAM_MENU_BUTTON
  • INVISIBLE_PARAM_SLIDER
  • INVISIBLE_PARAM_TOGGLE_SWITCH
  • XY_PARAM_PAD
  • XY_ZOOM_SELECT_PAD
  • XYZ_PARAM_SCRATCH_PAD
  • XYZ_PARAM_CLICK_PAD
Drawing, curves & 3D
  • CANVAS
    • Graphics API
  • svg
  • CURVE_GRAPH
  • XY_CURVES_GRAPH
  • GRID
  • RULER
  • COLOR_SCALE
  • VIEW_3D
  • COLOR_SURFACE_3D
  • GRID_3D
  • GL_OBJECT_3D
    • OpenGL Cheat Sheet
  • SURFACE_COLORMAP_2DPLOT
Miscellaneous
  • SCRIPT
  • WIDGET
  • KUIML_WIDGET
  • POPUP_MENU
  • MENU_ITEM
  • MENU_SEPARATOR
  • FILE_SELECT_MENU
  • SYSTEM_ACTION_BUTTON
  • SYSTEM_PARAM_CHECKBOX
  • SYSTEM_PARAM_DROPDOWN_LIST
  • WINDOW
  • LOAD_FONT
Data model
  • STRING
  • PARAM
  • FORMULA_PARAM
  • PARAM_ANIMATOR
  • ACTION
    • Built-in action types
  • TIMER
  • ACTION_TRIGGER
  • CURVE
  • FORMULA_CURVE
  • CURVE_FROM_PARAM_OVER_TIME
  • SURFACE
  • FORMULA_SURFACE
  • SURFACE_FROM_CURVE_OVER_TIME
  • GROUP
Links and commands
  • PARAM_LINK
  • PARAM_MULTI_LINK
  • PARAM_CONNECTION
  • PARAM_TO_STRING_LINK
  • STRING_LINK
  • STRING_MULTI_LINK
  • CURVE_LINK
  • CURVE_MULTI_LINK
  • SURFACE_LINK
  • REQUIRED_OBJECTS
  • EXPOSED_OBJECTS
  • PERSISTENT_OBJECTS
Common attrubutes
  • For all elements
  • Widgets
  • Param Widgets
  • Param Controls
  • Param Info Viewers
  • Text Widgets
  • Surface Viewers
  • Curve Viewers
  • Images
  • 3D Objects
Additional information
  • All attributes
  • Attribute types
  • Cursors
  • Math formulas
  • Scripting
    • Built-in addons
  • User experience
  • Errors and solutions
  • Built-in variables
  • Runtime model
  • Parameters mapping
  • Script converter
  • LetiMix
KUIMLReferenceCURVE_FROM_PARAM_OVER_TIME
August 22, 2025

CURVE_FROM_PARAM_OVER_TIME

This element can be used to create custom curves based on the variations of a parameter: the curve represents the evolution of the parameter over time.

Attributes brief detailed show all inherited

Name DescriptionDefault
nameDisplayed name of the curveempty
commentComment about the curveempty
duration_msDuration for the curve5000
Exposed: yesrefresh_time_msinterval between two sampled valuesYou should decrease this value if you are concerned with display performance issues50
param_idIdentifier of the parameter sampled over time to create the curveMandatoryempty
Exposed: v. 1.3pausedparameter sampling pausedUse this parameter to pause the curve (it will stop sampling the parameter)false
Events
Exposed: v. 2.0value_changedthe event is triggered anytime the value of the object has changed
Common attributesRead about `common`
idIdentifier of the elementThe id of an element has to be globally unique. Don't start with a digit for AngelScript compatibility.empty
Name Value type Default Description Comment
namestringemptyDisplayed name of the curve
commentstringemptyComment about the curve
duration_msAny positive integer value5000Duration for the curve
Exposed: yesrefresh_time_msAny positive integer value50interval between two sampled valuesYou should decrease this value if you are concerned with display performance issues
param_idparam idemptyIdentifier of the parameter sampled over time to create the curveMandatory
Exposed: v. 1.3pausedbooleanfalseparameter sampling pausedUse this parameter to pause the curve (it will stop sampling the parameter)
Events
Exposed: v. 2.0value_changedeventthe event is triggered anytime the value of the object has changed
Common attributesRead about `common`
ididentifieremptyIdentifier of the elementThe id of an element has to be globally unique. Don't start with a digit for AngelScript compatibility.

Examples

The following example creates a curve from param and allows changing various things on the fly:

  1. <!-- demo param -->
  2. <PARAM id="demo_param" min="-10" max="10" default="0" />

  3. <!-- curve from param over time -->
  4. <CURVE_FROM_PARAM_OVER_TIME id="curve_demo" param_id="demo_param" duration_ms="10000" refresh_time_ms="50"/>

  5. <!-- controls -->
  6. <ROW spacing="20">
  7. <PARAM_TEXT_CONTROL param_id="demo_offset" content="Offset: {value}"/>
  8. <PARAM_TEXT_CONTROL param_id="curve_demo.refresh_time_ms" content="refresh_time_ms: {value}"/>
  9. <PARAM_TEXT_CONTROL param_id="curve_demo.paused" />
  10. </ROW>

  11. <!-- display the curve on a graph -->
  12. <PNS_LCD_GROUP_BOX>
  13. <LAYER_STACK>
  14. <!-- grid -->
  15. <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" />

  16. <!-- first graph for the line (stroke) -->
  17. <CURVE_GRAPH curve_id="curve_demo" width="500" height="200" color="#327ca3" graph_style="stroke" opacity="1" line_width="4" />
  18. <!-- second line for the opaque bargraph -->
  19. <CURVE_GRAPH curve_id="curve_demo" width="500" height="200" color="#327ca3" graph_style="bargraph" opacity="0.2" line_width="4" />

  20. <!-- horizontal ruler -->
  21. <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" />

  22. <!-- vertical ruler -->
  23. <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"/>
  24. </LAYER_STACK>
  25. </PNS_LCD_GROUP_BOX>

  26. <!-- demo logic -->
  27. <PARAM id="demo_offset" min="-5" max="5" default="0" />
  28. <SCRIPT script="double demo_val = 0;" />
  29. <TIMER id="forever_timer" refresh_time_ms="5" />
  30. <ACTION_TRIGGER event_id="forever_timer.elapsed"
  31. script=" 
  32. demo_param = demo_offset + sin(demo_val)*5;
  33. demo_val+=0.04;
  34.  " requires="demo_param;demo_offset;" />

If you want to clear the curve every time it's "unpaused", you can use trick like this (slightly change refresh_time_ms which causes curve to start all over).

  1. <!-- trick to clear the curve every time its unpaused -->
  2. <ACTION_TRIGGER event_id="curve_demo.paused.value_changed" condition_formula="curve_demo.paused==0" script="curve_demo.refresh_time_ms = curve_demo.refresh_time_ms+rand(-0.00000001, 0.00000001)" requires="curve_demo.refresh_time_ms" />

Related elements

See CURVE_GRAPH, FORMULA_CURVE, GRID, RULER, CURVE, CURVE_LINK, CANVAS.


Comments

Please, authorize to view and post comments.

2020 - 2025 © Site by LetiMix · Donate  |  Plug'n Script and KUIML by Blue Cat Audio