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
KUIMLReferenceMath formulas
July 19, 2025

Math formulas

The Language supports mathematical formulas for several purposes (attributes computation, curves or surfaces defined with formulas etc.). The syntax is similar to common mathematical notations on computer systems. Example:

  1. <PARAM_LINK ... formula="3*x^2+cos(pi/2)*x+1" />

The language supports most common operators (*,/,+,-,^) as well as several predefined mathematical functions. The complete list is available below:

Symbol Operation Example & Comment
+ Addition x+1
* Multiplication x*y
- Subtraction 5-z
/ Division x/2
^ Power a^2 represents "a square"
% Modulo x%5 means "x modulo 5"
== Equals a==b means "a equals b" and the result is true or false. You can also use '='
!= Not Equals a!=b means "a does not equal b" and the result is true or false. You can also use '<>'
< Less than a<b means "a strictly less than b" and the result is true or false
> Greater than a>b means "a strictly greater than b" and the result is true or false
<= Less than or equal a<=b means "a less than or equal to b" and the result is true or false
>= Greater than or equal a>=b means "a greater than or equal to b" and the result is true or false
|| Boolean "OR" a||b means "a or b". You can also use 'or' (case sensitive)
&& Boolean "AND" a&&b means "a and b". You can also use 'and' (case sensitive)
! Boolean "NOT" !(x==y) is equivalent to "x!=y" and means "x is not equal to y". You can also use 'not' (case sensitive)
sqrt Square root sqrt(2)
abs Absolute value abs(-1) equals to 1
floor Rounds to lowest integer floor(1.25) equals to 1
ceil Rounds to highest integer ceil(1.25) equals to 2
round Rounds to closest integer round(1.25) equals to 1, and round(1.75) equals to 2
sin Sine sin(pi)
cos Cosine cos(x)
tan Tangent tan(2*pi*x)
exp Exponential exp(10)
log Logarithm log(1) is equal to 0
sinh Hyperbolic sine sinh(pi)
cosh Hyperbolic cosine cosh(x)
tanh Hyperbolic tangent tanh(x)
pi Pi Constant (3.14159...) cos(pi) is equal to -1
min Minimum min(1,2) is equal to 1
max Maximum max(1,2) is equal to 2
bitvalue Value of specified bit number bitvalue(x,n) returns the value of the nth bit of integer x
if if(condition,then,else) if(true,a,b) returns a and if(false,a,b) returns b

Comments

Please, authorize to view and post comments.

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