Iniciar sesión

Automation

Switch Program by who is speaking or on a schedule, fire actions on show events, record and run macros, and write scripts that drive Studio.

Automation runs the show for you: Auto Switching cuts Program to whoever is speaking or on a schedule, Triggers fire an action when something happens, Macros replay a list of actions and Scripts run JavaScript that drives Studio. Everything an automation does meets the same plan checks and refusals as an action made by hand.

The Automation window on macOS, Auto Switching tab, with timing and two rules
Auto Switching on macOS.

What you need

Auto switching needs Studio auto switching; triggers, macros and scripts need Studio triggers and macros. Both are in Studio 8K, Enterprise and the Free trial. See Plans and limits.

Open Automation

Click Automation in the Studio toolbar. The button shows a bolt, filled and lit while auto switching is on. Its tooltip reads "Automation: auto switching, triggers and macros", or "Automation: auto switching is on". The window is Automation, with the tabs Auto Switching, Triggers, Macros and Scripts.

The status line

One line under the tabs says what Automation is doing:

TextMeaning
Auto switching offThe rules are off.
Auto switching onThe rules are listening and may switch Program.
Auto switching pausedA shot taken by hand is holding the rules.
Speaking: {names}The channels the rules hear as speaking now.
Running: {names}The macros playing now.
Scripts: {names}The scripts running now.
Recording {name}: {n} stepsA macro being recorded. It adds ", {n} skipped" when some actions could not be recorded.

Auto Switching

Switch and timing

Turn on Switch Program automatically to start the rules. It is off by default.

The numbers keep the picture from jumping on every cough. A change of shot happens only once the winner has held for Hold a new winner and the shot on Program has been up for Keep a shot, whichever of the two ends later.

SettingRangeDefaultWhat it does
Hold a new winner0 to 3,600,000 ms (one hour)800 msHow long a new winner must keep winning before Program switches to it.
Keep a shot0 to 3,600,000 ms3000 msThe shortest time a shot stays on Program before the rules may switch again.
Fade between shots0 to 3,600,000 ms0 msThe length of the crossfade of each automatic switch. 0 is a cut.
Speaking above0% to 100%5%The meter level above which a channel counts as speaking.

On macOS each time has a stepper (steps of 100 ms, 500 ms for Keep a shot), and a typed value is held to its range. Windows shows the times in milliseconds, for example Hold a new winner (ms).

Rules

Add rule adds a rule, up to 32, numbered Rule 1, Rule 2 and so on. A counter reads "2 of 32" (Windows: "Rules (2 of 32)"). Remove rule {n} deletes one. A new rule starts as A channel speaks on the first channel, showing the first input.

SettingChoices
WhenA channel speaks, Nobody speaks, On a schedule
ChannelShown for A channel speaks. The mixer channel to listen to.
Use the noise gateSpeaking means the channel's noise gate is open (the strip's gate must be on). Windows: Gate, "Speaking is the gate open."
EveryShown for On a schedule. 1000 to 3,600,000 ms, 10,000 ms when you pick the kind.
ShowThe input to take. A scene is an input too, so a rule can show a scene.
Priority0 to 255, 0 for a new rule. Higher wins, whatever the loudness.

What each When means:

  • A channel speaks: the channel's meter peak is above Speaking above, or, with Use the noise gate, its gate is open.
  • Nobody speaks: none of the channels your A channel speaks rules listen to is speaking. This is the wide shot for silence.
  • On a schedule: the rule becomes a candidate Every period after its shot last aired, or after the rules came on, and stays one until it airs again. Nobody needs to speak.

The best rule wins: the highest priority, then the loudest speaker, then the first rule. The channel a rule listens to does not have to be the input it shows.

Remove an input from Studio and the rules and triggers that named it go with it.

Pause and resume

Any change of Program that is not the rules' own take pauses them: a click, a key, a control surface, or a take by a trigger or macro. The status line reads Auto switching paused and the tab shows Paused: "A shot taken by hand holds the rules." Click Resume, or turn Switch Program automatically off and on, to resume. From then the shot on Program counts as the rules' own.

Turning auto switching off never asks for the plan. Auto switching is always off when a show opens; its rules are saved in the show.

The Automation window on Windows on the Auto Switching tab: Switch Program automatically, the timing for holding a winner, keeping a shot and fading, the speaking gate, and Add rule
Auto Switching on Windows.

Sound and the lock

Auto switching changes the picture, not the mix. The input it takes brings its own sound only when its strip has AFV (audio follows video) on. The channel a rule listens to does not have to be the input it shows: you can listen to a room microphone and show a wide shot. See Audio mixer.

Lock Switching freezes the switching controls in the Studio window so a stray click cannot cut away. It does not stop the rules, triggers or macros, which run in Studio's engine, not through those controls.

Triggers

A trigger is one line: when something happens, do one action. Each trigger fires once per occurrence.

The Triggers tab lists each trigger with When, Does and Value, and the selected one's form below. Triggers fire arms them all, on by default (macros run either way). Add trigger adds one, up to 64; it starts as Recording starts with the first action. Remove trigger deletes the selected one. With none the tab reads "No triggers. Use Add: fire an action when recording starts, an input goes to Program, a caller joins and the like."

What starts a trigger

EventFires when
An input goes to ProgramThe Input you pick comes on Program. The list reads "2 Camera goes to Program".
An input leaves ProgramThe Input leaves Program. The list reads "2 Camera leaves Program".
Recording starts, Recording stopsRecord turns on or off.
Streaming startsThe first stream destination starts.
Streaming stopsThe last stream destination stops.
The timer enters a phaseThe timer reaches the Phase you pick: idle, talk, warning, overtime or paused. The list reads "The timer is talk".
A caller joins, A caller leavesA guest joins Studio (into the green room), or leaves.

What a trigger does

Does is any action from the External Control catalogue, with its settings. A switch takes Toggle, Turn on or Turn off; a level takes a Value. The trigger keeps the action as picked, so "the input on Preview" means the one on Preview when it fires. Secrets such as stream keys can never be part of a trigger or a step.

The Triggers tab on macOS with two triggers
Triggers on macOS.

Macros

A macro is a named list of steps, each an action from the same catalogue as a trigger, with a wait before it. Macros run whether or not Triggers fire is on, and External Control can run or stop one too.

The list shows each macro with its step count, and Recording or Running beside the one recording or playing. Right-click a macro for Run, Stop, Duplicate and Remove.

Record a macro

  1. Choose Record macro.... In Record a macro give it a Name and press Record (or Cancel).
  2. Work in Studio as you normally would. Each action you take becomes a step, with the wait since the step before; the first step's wait counts from Record. The status line shows Recording {name}: {n} steps.
  3. Press Stop recording. A macro of the same name is replaced.

Good to know:

  • Only catalogue actions become steps. Anything else is left out and counted as skipped in the status line.
  • Editing macros is never recorded, and neither is anything a trigger, a macro or the auto switcher does.
  • A recording stops adding steps at 256; further actions count as skipped.

Write a macro

New macro, a name, Create. The name is trimmed and may not be empty. Then Add step, up to 256; each step has Wait before (0 to 3,600,000 ms, 0 by default) and Action (Windows: Does), with its settings, or Toggle, Turn on, Turn off or a value as for a trigger. On macOS the step table shows #, Wait and Action, and a counter reads "3 of 256". Move step up, Move step down (Windows also Ctrl+Up, Ctrl+Down) and Remove step reorder and delete. With no steps the tab reads "No steps. Add a step, or record the macro again." Duplicate the selected macro copies it as "{name} Copy", then "{name} Copy 2"; Remove the selected macro (Delete) deletes it.

Run a macro

Pick it and click Run (off for a macro with no steps, which does nothing); Stop ends it early. The status line shows Running: {names}. Running a macro that is already running keeps its place. Several macros can run at once. A step's wait counts from the step before's due time, so a late moment never stretches the timing. A refused step gets the same notice as a hand-made action.

The Macros tab on macOS with a macro and its steps
Macros on macOS.

Scripts

A script is JavaScript that drives Studio. Each runs on its own, with only the cliqer object: no file or network access.

CallWhat it does
cliqer.act(id, args)Runs an External Control action.
cliqer.vmix(line)Runs a vMix-style function line.
cliqer.state()Returns the show's state.
cliqer.wait(ms)Waits.
cliqer.on(eventName, timeoutMs)Waits for transitionIn, transitionOut, recordStart, recordStop, streamStart, streamStop, timerPhase, callerJoin or callerLeave.
cliqer.print(...)Writes to the Run log.

New script, write it in Script source, Save. Run and Stop work as for macros. Rename... renames it, Clear empties the Run log ("Nothing logged yet."). On macOS a script of the same name is replaced; on Windows a script name is used once. A script that computes for more than 5 seconds between cliqer calls is stopped.

The Scripts tab on macOS with a script, its source and the Run log
Scripts on macOS.
The Scripts tab of the Automation window on Windows with the Open Session script selected and its Run log showing INFO Session open
Scripts on Windows.

The plan notice

Without the feature, each tab keeps its controls and shows a notice with Upgrade:

  • Auto Switching: "Auto switching is part of the Studio plans. Yours does not include it, so the rules never switch Program."
  • Triggers: "Triggers and macros are part of the Studio plans. Yours does not include them, so none fires."
  • Macros: "Triggers and macros are part of the Studio plans. Yours does not include them, so none runs."
  • Scripts: "Scripts are part of the Studio plans. Yours does not include them, so none runs."

Stopping never asks: you can always turn auto switching or Triggers fire off, stop a macro or remove one.

Limits

WhatMost
Rules32
Triggers64
Macros64
Steps in a macro256
A macro name64 characters
Scripts64
A script's source64 KiB
A wait, hold, shot, fade or schedule periodone hour (3,600,000 ms)
A schedule period, shortest1 second

Rules, triggers, macros and scripts are saved in the show.

External control

The action catalogue triggers, macros and scripts use.

Audio mixer

Channels, gates and meters the rules listen to.