This function requires at least a Wings Vioso license. See also Licenses and functions.
Wings Vioso RX features a formula parser which allows values to be changed mathematically or generated on a time basis. The formula parser may be used in the following cases:
For the Control of screen field parameters of a track, i.e. of position, size, rotation and rotational center, e.g. in order to achieve movements such as sinus oscillations, a circular path and the jumping of a ball. Further information can be found in section Control of screen field parameters.
For changing values in variables. The values can be supplied by Wings Vioso RX itself or an Avio device. It allows you to define and limit control ranges. Further information can be found in topic Changing values.
Use of the formula parser requires detailed mathematical knowledge as the required functions need to be entered as a mathematical formulas. In addition to a mathematical operation a formula can also contain logic comparisons. The various options offered by the formula parser are explained in section Formula parser reference list.
To give you a chance to find out about variables and formula parser we have prepared a tutorial and demo project which allows an insight also for users who think they have a lower mathematical ability. See also Screen field control via formulas.
Click Realtime control in the function bar following which at least one yellow slider will be displayed per track.
Highlight a track and, in the Properties Table, click on tab Realtime control. Below Properties check the box next to Active.
Below it you can enter the desired formulas next the the parameters. They are executed during playback and control the screen field accordingly.
Wings Vioso RX features variables that can be modified by means of formulas. Moreover, you can also use the variables themselves for calculations. In the Media Pool Variables add the variables by right-clicking the section. The following variables are available:
Value Out variables …allow sending of information to other Avio devices and controlling of parameters in Wings Vioso RX.
Value In variables …receive values from Avio devices for further use in Wings Vioso RX.
Function generator …generates functions and/or a time-based value which can also be used in Avio.
Internal Variables ...for internal calculations using the formula parser and exchange of data within Wings Vioso RX.
Text Out variables ...allow sending of text to other Avio devices.
Text In variables ...receive text from Avio devices for further use in Wings Vioso RX.
In a variable line you can enter the value range in columns Minimum and Maximum. The required formula is entered in the corresponding column.
A variable can be dragged and dropped into the Control Panel and be placed there as a control panel field. It shows the current value. For Avio and Generator (Formula) variables the current value can be changed by dragging the yellow bar. This enables the priority function which can be recognized by the override button in the control panel field and entry Control Panel in column Routing in the Media Pool. The value is no longer defined by the formula or the Avio device but by the control panel field.
A variable type Value Out allows a data object to be linked up with an effect parameter making the effect dynamically controllable by data object.
Please note the following:
Here you will find all the functions offered by the formula parser. Important note:
In formulas a decimal point is used (English notation).
The comma is used as a separator between two logical expressions, e.g. as a separation of values.
Single-character operators
- |
turns into a negative value |
° |
converts degrees into radians |
_rtd |
converts radians into degrees |
_r |
converts radians into the interval [0, 1] |
_° |
converts degrees into the interval [0, 1] |
Double-character operators (in order of priority)
^ |
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 |
== |
is equal to Attention: For internal purposes, Wings Vioso RX uses the file format "double precision floating point" for variables, which might cause problems when comparisons are used carelessly. |
!= |
is not equal ('Attention: see above) |
|| |
logical "OR" |
&& |
logical "AND" |
= |
allocation (parser requires write authorization, otherwise error!) |
Constants
_pi |
π, Pi |
_e |
e, Euler's number |
Trigonometric functions
sin(x) |
sinus (x) |
cos(x) |
cosinus (x) |
tan(x) |
tangens (x) |
asin(x) |
arcus sinus (x) (inverse function) |
acos(x) |
arcus cosinus (x) (inverse function) |
atan(x) |
arcus tangens (x) (inverse function) |
atan2(x, y) |
arcus tangens (quadrant selections), values between -PI and PI |
Hyperbolic functions
sinh(x) |
sinus hyperbolicus (x) |
cosh(x) |
cosinus hyperbolicus (x) |
tanh(x) |
tangens hyperbolicus (x) |
asinh(x) |
arcus sinus hyperbolicus (x) (inverse function) |
acosh(x) |
arcus cosinus hyperbolicus (x) (inverse function) |
atanh(x) |
arcus tangens hyperbolicus (x) (inverse function) |
Exponential function
exp(x) |
e^(x) |
Logarithm
ln(x) |
Logarithm to base e |
log2(x) |
Logarithm to base 2 |
log10(x) |
Logarithm to base 10 |
Integer conversion
round(x) |
rounding to integer |
floor(x) |
greatest integer greater than or equal to x |
ceil(x) |
smallest integer greater than or equal to x |
Random number generator
rng() |
random number between 0 and 1 (random number generator) |
Various
sqrt(x) |
square root (x) |
abs(x) |
absolute value (x) |
sign |
sign (x) |
saturate(x) |
clamp x to [0, 1] |
step(value, x) |
(x >= value) ? 1 : 0 |
clamp(x, min, max) |
restricts x to the interval between min and max |
smoothstep(min, max, x) |
Hermite interpolant for x between min and max, x < min => 0, x > max => 1 |
lerp(a, b, x) |
linear inter/extrapolation between a and b, x == 0 => a, x == 1 => b |
Area allocation
map(from_min, from_max, to_min, to_max, x) |
maps x from interval [from_min, from_max] (values outside this range are truncated) to interval [to_min, to_max]. |
The following functions search for variables via their names without knowing about their context (read and write access). This may turn out to be problem if variables have equal names but are used in different contexts. Please note that the variable name is between quotation marks.
map_int("variable name", min, max) |
restricts the value range of variable "variable name" to integers between min and max. |
map8("variable name") |
restricts the value range of variable "variable name" to integers between 0 and 255. |
map16("variable name") |
restricts the value range of variable "variable name" to integers between 0 and 65535. |
cmp8("variable name", value) |
restricts the value range of variable "variable name" to integers between 0 and 255 and compares it to "value". |
mp16("variable name", value) |
restricts the value range of variable "variable name" to integers between 0 and 65535 and compares it to "value". |
cmp_dmx("variable name", value) |
restricts the value range of variable "variable name" to integers between 0 and 255 and compares it to "value". |
cmp_midi("variable name", value) |
restricts the value range of variable "variable name" to integers between 0 and 127 and compares it to "value". |
Variable parameter functions
sum(a, b, c, ...) |
a + b + c + ... |
avg(a, b, c, ...) |
average (a, b, c, ...) |
min(a, b, c, ...) |
minimum (a, b, c, ...) |
max(a, b, c, ...) |
maximum (a, b, c, ...) |
Conditional functions
if (condition) then (expression A) else (expression B) |
If "condition " is true, then execute "expression A", else "expression B" |
(condition) ? (expression A) : (expression B) |
as above, but simplified notation |
Global variables
tYear |
year, 4-digits (PC setting) |
tMonth |
month, 1...12 (PC setting) |
tDay |
day, 1...31 (PC setting) |
tWeekday |
weekdays, Sunday = 0, Monday = 1, ... Saturday = 6 |
tHour |
hour, 0...24 (PC setting) |
tMin |
minutes, 0...60 (PC setting) |
tSec |
seconds, 0...60 (PC setting) |
tSys |
PC system time (shortcut ts) |
peakLevel01 |
channel 1 peak level (stereo L) (short cut pl1) |
peakLevel02 |
channel 2 peak level (stereo R) (shortcut pl1) |
rmsLevel01 |
channel 1 RMS level (stereo L) (shortcut rl1) |
rmsLevel02 |
Channel 2 RMS level (stereo R) (shortcut rl2) |
Track variables
alpha |
track transparency (shortcut al) |
xPos |
X position of track screen field (shortcut xp) |
yPos |
Y position of track screen field (short cut yp) |
xZoom |
X-size of track screen field (short cut xz) |
yZoom |
Y size of track screen field (shortcut yz) |
xRot |
rotation around the X-axis (shortcut xr) |
yRot |
rotation around the Y axis (shortcut yr) |
zRot |
rotation around the z axis (shortcut zr) |
xRotC |
X position of rotational center (shortcut xc) |
yRotC |
Y position of rotational center (shortcut yc) |
Time variables
Time variables always refer to one track and refer to the current locator position. Therefore, they can only be used in the Properties Table Realtime and not in the Media Pool Variables.
tObjAbs |
absolute, timeline-based time from object beginning to object end(shortcut toa). |
tObjRel |
relative, object-based time from object beginning to object end (shortcut tor) |
tDispAbs |
absolute, timeline-based time from fade-in beginning to fade-out end (shortcut tda) |
tDispRel |
relative, object-based time from fade-out beginning to fade-out end (object duration) (shortcut tdr) |
tFadeInAbs |
absolute, timeline-based time from fade-in beginning to fade-in end (shortcut tfia) |
tFadeInRel |
relative, object-based time from the fade-in beginning to the fade-in end (shortcut tfir) |
tFadeOutAbs |
absolute, timeline-based time from fade-out beginning to end (shortcut tfoa) |
tFadeOutRel |
relative, object-based time from fade-out beginning to fade-out end (shortcut tfor) |
tTlAbs |
absolute timeline time (shortcut tta) |
tTlRel |
relative timeline time from the beginning of the timeline to the end of the last object as values from 0 to 1 (shortcut ttr) |
Further variables
ObjWidth |
object width in screen coordinates |
ObjHeight |
object height in screen coordinates |
ScreenRatio |
screen aspect ratio |
Generation of variables
create variable name |
creates a variable "variable name". The variable must be created before it is used the first time. |