When channels are connected the value ranges can be scaled via formulas. In the dialog appearing during the connection process select Connect smart following which dialog Set Formula will appear.
For an existing connection you highlight the channel following which the connection is displayed at the bottom under Connections. Right-click the corresponding connection entry, select Add Formula and the dialog Set Formula will appear.
The easiest way to add a formula is via the Wizard. To do so click on Wizard and select one of the following formulas:
Absolute ...outputs the absolute value of the source; negative signs are ignored.
Add ...adds the source value to a value specified under Summand.
Clamp ...limits the source value to a range specified by Minimum and Maximum. If the source value exceeds the maximum value or falls below the minimum value, the maximum or minimum values are output.
Divide ...divides the source value by the specified Divisor.
Multiply ...multiplies the source value by the specified Multiplicand.
Not ...is a logic reversal. If the source value is zero, a value of 1 is output. If the source value is unequal to zero, zero is output.
Random ...generates a random value within the range defined by Minimum and Maximum.
Scale ...transforms the source range to a target range. The source range is defined by Minimum Source and Maximum Source and the target range by Minimum Destination and Maximum Destination.
Scene Call ...outputs the value defined at Output if the source value is unequal to zero.
Set If-Else ...outputs the value defined at Result if the condition defined at Condition is fulfilled. If the condition is not fulfilled the value defined at Alternative Result is output.
Set If ...outputs the value defined at Result 1 if the condition defined at Condition 1 is fulfilled. Optionally, further conditions can be added, by entering the desired number at Number of additional conditions. When several conditions are defined the value at Result 1 is only output if all conditions have been met.
After this click OK to enter the formula. Alternatively, you can also enter a formula directly. Click Test and enter a source value to test the formula. Then click Connect to make the connection using the formula.
For direct entry of formulas the following operators and functions can be used:
^ |
to the power (for defining an exponent) |
/ |
division |
% |
modulo (rest after a division) |
* |
multiplication |
- |
subtraction |
+ |
addition |
< |
is less than |
<= |
is less than or equal to |
> |
is greater than |
>= |
is greater than or equal to |
== |
equal |
~= |
unequal |
or |
logical "OR" |
and |
logical "AND" |
= |
assignment |
sin(x) |
sinus (x) |
cos(x) |
cosine (x) |
map(from_min, from_max, to_min, to_max, x) |
maps x from interval [from_min, from_max] (values outside this range are cut off) onto Interval [to_min, to_max]. |
sqrt(x) |
square root (x) |
abs(x) |
absolute value (x) |
clamp(x, min, max) |
limits x to the interval between min and max |
_pi |
π, Pi |
rng() |
random number generator generates a random number between 0 and 2^31 (highest number to be displayed); When you enter a parameter, e.g. rng(5), the function outputs a random number between 0 and the entered parameter. If two parameters are entered, e.g. rng(10,20) the function generates a random number between the first and the second parameter. |
See also Connecting and editing channels.