What are variables and why use them in the Automator?
A variable is a piece of data of which the value can change. These values can be set and used in different ways: a variable's value can be predefined or it can be set using an automation action.
Using variables in the Automator can make the automations even more powerful. You can use variables to alternate between multiple clip inputs in vMix (or Caspar, or...), you can use them to store color codes, you can use Label fields in Cuez and set the selected value as a variable in the Automator for use throughout your show, and more.
Where can I access variables?
To access the Variables menu in the Automator, go to the gear icon in the top right corner of the Automator, then select 'Variables' from the menu.
Which variables are available and how do I create them?
The Automator has 2 types of variables:
The 'normal' variable
The normal variable works exactly how you would expect: it can store a single piece of information, predefined or not, and make that information available throughout the automation of your show.
To add a variable to your project's Automator configuration, click '+ add variable' on the Variables screen. A new line starting with '(x)' will appear.
Under 'Name' you can give your variable a name. We recommend keeping it short and clear as this name will be shown throughout the Automator.
Under 'Description' you can add a description to your variable, helping you remember or understand what the variable would be used for.
Under 'Default Value' you can optionally add a (starting) value for your variable. Whether or not this is needed, depends on how you plan on using the variable (more on that later in this article).
The 'AB-alternator'
The AB-alternator has 2 values that it can alternate between, a default value and a B-value.
To add an AB-alternator to your project's Automator configuration, click '+ add AB-alternator' on the Variables screen. A new line starting with 'โ' will appear.
Under 'Name' you can give your AB-alternator a name. We recommend keeping it short and clear as this name will be shown throughout the Automator.
Under 'Description' you can add a description to your AB-alternator, helping you remember or understand what the variable would be used for.
Under 'Default Value' you can enter the starting value of the AB-alternator variable (more on that later in this article).
Under 'B-value' you can enter the B-value (or alternative value) of the AB-alternator variable (more on that later in this article).
Variables use-cases (examples)
The 'normal' variable
The 'normal' variable, which can have a predefined value or have a value assigned via an automation function, can be used in many different ways. Below we will look at a couple examples, such as storing the value of a Cuez Label field to use throughout your automations, storing color codes to more easily set colors in vMix for example, or even create a scoring system for a quiz or game show.
Using variables to store Label field values
In the configuration of your Blocks, you have the option to add Label fields to the Blocks to easily select for example if a Clip has sound or not, if a Graphic is landscape or portrait, and so on. These Label field values can easily be used to create conditional automations in the Automator. For more advanced use-cases, we can take this even further with variables.
In your Cuez Project, you could create an 'Opener' Block (at the top of the Rundown) where certain default options could be selected using Label fields. The selected options can then be stored in variables and called throughout the rest of the show, in order to automate other functions in the show.
In the example above, we see an 'Opener' Block where we can select:
The position of the host on the set
Which camera to use
Which camera shot to use
Whether or not to enable the sound
The type of show we are making
We could set these options multiple times throughout the show, but it is more interesting to set some defaults at the start of the show and have the Automator remember these for further automations.
With the above Label fields we could use functions in our 'Opener' Block to create variables to:
Make camera and shot combinations
Set a show type, then use that value to use specific lower third designs for that show type
...
Later on in our show, we can then use the variable values (which contain the show type, or camera shot or...) to create conditional automations as needed.
Using variables to store and set color codes in vMix
For our next example we will store color codes as variables so we can use them with vMix functions in order to set background colors of questions and answers for a Quiz show.
In the example below, which is a simple GTTitle in vMix, we have answers A, B and C, which all have a background color. They start out with a blue background, but can change color depending on which answer was selected and what the correct answer is.
To create this automation, we will make use of variables to easily store the color codes for our backgrounds. This way, if we ever want or need to change the colors for example, we only need to update them in our variables settings, meaning that every automation that uses the variables will automatically be up-to-date with the new colors.
Below, we see the 3 variables we use in our example, being one variable with the default background color, one for the color for the correct answer and one for the color of the answer chosen by our contestant. We gave them a clear name and the color code as the 'Default Value'.
Once we have our variables, we can set up our functions to set these colors when needed. We use Step buttons to trigger our functions, such as here to mark answer A as the contestant's choice, using our 'COLOR CHOICE' variable.
We have Step buttons for each of the possible answers, as well as to bring our animation in or out, reveal the correct answer, reset the question, and so on. Each Step button has its own respective functions.
For our reveal Step, we work in a similar way. We use conditional automations to set the background color of the correct answer to green, which uses our 'COLOR CORRECT' variable.
The end result, using our (color) variables and Step buttons, is that we can easily trigger the different stages of answering and revealing our Quiz questions.
The 'AB-alternator'
The AB-alternator, with the 2 values that it can alternate between, has multiple applications, but let's take playing video clips in vMix as an example to explain one of the main uses.
To make sure you can seamlessly play 2 videos back-to-back in your production, without any black frames or any other interruption in between, having 2 separate inputs in vMix (or Caspar, or...) would be needed. In the example below, we see that we have an input 'Clip A' and an input 'Clip B' that we will use for precisely this reason.
Using these 2 inputs, we could manually decide which clip goes to which input, but that would require a lot of manual work, making it prone to errors. This is where our AB-alternator comes into play.
Using the 'Variables' menu, we can create an 'AB-alternator' variable (1) and give it a name (2). In our example we called it 'CLIP VAR', as that name makes clear what it will be used for. We can optionally add a description for it as well.
Next, we have to enter the 'Default Value' (3), as well as the 'B-Value' (4) for our alternator. These values need to contain the exact name of the inputs from our vMix that we will be using. For our first input this means 'CLIP A', for the second one 'CLIP B', based on our example vMix setup.
Once this information has been entered, our AB-alternator becomes available to use in your automations.
To have the Automator check the current (active) value of our AB-alternator, as well as alternate between the two values, we have to start with a 'System' function ('System' being the Automator itself) where we will call the function to update the variable.
In the 'SYSTEM.Update Variable' function, we can select our newly created AB-alternator to have the Automator toggle between the 2 values. This means that, if a clip is already playing in our 'CLIP A' input, the next one will be sent to our 'CLIP B' input. The next one after that will then go to 'CLIP A', then 'CLIP B' again, and so on.
We can then follow with all other functions we need in order to play our clip in our vMix setup. In the example below we see the functions to empty our List input, add the clip media into our List input and then put the input in Preview.
These 3 functions would normally require you to select the vMix input on which you'd want to perform the function, but using an AB-alternator means that we will select the AB-alternator variable instead. That way the Automator will always check which input to use and send/play the clip according to that.
The result of this configuration is that you can now trigger clips in your rundown and won't have to worry which of the 2 inputs it needs to play on in order to have seamless playback of multiple clips in a row.