Modifiers
Modifiers are logical building blocks in UNIVERSE. They are used to modify and evaluate data provided by Controls or Device Nodes. To add a Modifier to a Stage drag and drop it from the Modifiers tab to the Stage.
When a Modifier allows adding multiple methods these will be chained together in the way that the input will be processed by the first method, the result is passed to the second method and so on. The result created by th last method is provided at the output.
Types
Calculation
The Calculation Modifier has basic mathematical functions to offset and scale values. It has two inputs and one output. The method by which the two inputs are combined can be specified in the Properties of the Modifier. You can either feed both inputs by external values or you can use a static value for one input by setting in the Properties.
Decision
The Decision Modifier is the perfect tool for evaluating values and creating separate signal flows.
In the Properties there is list of conditions that is evaluated everytime a new value is available at the input.
For every condition a new output is created that can be connected to a Button then the Connection type is set to Control or a Label when set to Data.
If Data is selected you can either output a constant value, the value of an input by using the %
sign or the value of a Variable with the #
sign.
Every condition can consist of multiple sub-conditions that are connected by a boolean operator. These can added using the dropdown arrow on the right side of the condition field.
It supports the following boolean operator:
- AND: Both parts need to be true for the result to be true.
- AND NOT: the first must be true while the second is fault for the result to be true.
- OR: One of the sub-conditions needs to be true for the result to be true.
- OR NOT: The first must be true or the second must be false for the result to be true.
Generator
The Generator Modifier generates values in a given interval and range using the type specified. There are four methods available:
Type | Description |
---|---|
Random | Generates random values in the given range. |
Count | Counts up values by the given step value. |
Value | Outputs the specified value. |
Timecode | Outputs a timestamp in timecode format. Note: This timecode should not be used in production! |
Text
The Text Modifier offers a whole set of string operations. It is a valuable tool for analysing and and parsing incoming data strings. By pressing the + button you can add new inputs to the Modifier that can be used in the Methods. The following methods are available:
Method | Description |
---|---|
Add | Add a prefix and/or suffix to an input |
Replace | Replace the specified pattern by the target string. |
Upper | Convert the input to uppercase. |
Lower | Convert the input to lowercase. |
Clear Character | Filter the input to contain no or only digits. |
Substring | Extract a substring from the input from the start index to the end index. |
Trim | Remove a part of the input string from the start index to the end index. |
Split | Split the input using a separator character. The output value is defined by the position parameter. |
Combine Inputs | Combines multiple inputs. |
To use another input as parameter you can address the input by the %
sign, e.g. %B
as prefix parameter.
Arithmetic
The Arithmetic Modifier provides advanced mathematical functions. The following actions are available:
Method | Description |
---|---|
Normalize | Maps the input value in a specified input range to an result in the specified output range. Clip values sets values greater than the maximum to the maximum. |
Round | The Round Method has four modes of operation:
|
Smooth/Average | Averages incoming values. The level determines how many values are considered for the average. |
Convert | The Convert method offers a lot of functions to convert between different data numerical types. |
Variable
The Variable Modifier is one way to interact with the Variables that are defined for the Project in the the Variables tab of the Info Panel. The Variable that you want to interact with can be specified in the Properties of the Modifier. The second parameter in the Properties in the action that should be performed on the Variable. The following actions are available:
Action | Description |
---|---|
Set Value | Saves the input to the Variable. |
Add Value | Add the input to the Variable. |
Substract Value | Substracts the input from the Variable. |
Substract from Value | Substracts the value oof the Variable from the input and saves the result to the Variable. |
Multiply Value | Multiplies the Variable by the input. |
Divide by Value | Divides the value of the Variable by the input and saves the result to the Variable. |
Divide from Value | Divides the input by the value of the Variable and saves the result to the Variable. |
Append to Value | Append the input to the Variable as a string. |
Remove from Value | Removes the input from the Variable. |
Watch Changes | Outputs the new value of the Variable when it is changed. |
Data
The Data Modifier parses data from different source and in different formats. As formats you can choose between JSON and CSV. The Modifier can read the data either from a file, a folder or a string provided by e.g. a Label. As an example you can take a look at the vMix Lower Third Demo.
Timecode
The Timecode Modifier processes timestamps by converting them or adding offsets. This also works with epoch time values.
Script
If none of the above works in order to archive what you can use the Script Modifier. It takes custom C# code to connect the defined inputs with outputs. The code is compiled just-in-time and seemlessly integrated into UNIVERSE.
Activation Modes
Modifiers that can be configured to accept multiple inputs have a Property called "Activation". There are three modes available:
Activation Mode | Description |
---|---|
Complete | The Modifier waits for all inputs to be set before executing. |
Pending | When one input is set the Modifier waits 200ms for other. |
Immediately | THe Modifier executes as soon as one input is set using the last data set to the remaining inputs. |