How To Become a Fade Ninja

One of the most repetitive tasks when programming a show in QLab is creating fades. Every Audio cue you start is likely to require a fade out at some point, and often a fade in. This is a very short chapter that provides an AppleScript-based method for quickly creating fades in and out for Audio cues.

In these examples, we will use simple stereo cues assigned to cue outputs 1 and 2 at 0dB. All level setting will be done with the master fader.

First, let’s take a quick look at the two main programming styles for fades. The starting point for both methods is the same: Drag a stereo audio file into the cue list to create an Audio cue.

If you are going to want the cue to fade out at some point, you might as well create that fade now and then either drag or cut-and-paste it into the required position.

To make a fade out:

  1. Select the Audio cue;
  2. Create a Fade cue underneath this cue by clicking the Fade cue icon in the toolbar or using keyboard shortcut ⌘7;
  3. If you are using QLab 4.4 or later, the Fade cue will automatically target the Audio cue that was selected. If you are using an earlier version of QLab, manually set the target of the Fade cue by dragging the Audio cue on top of the Fade cue;
  4. Set the master level of the Fade cue to -INF and click the checkbox labeled stop target when done (unless you are going to fade the Audio cue back up later.)
  5. Set the duration of the Fade cue in the action column or the Curve Shape tab of the inspector.

To make a fade in:

  1. Select the Audio cue;
  2. Create a fade cue underneath this cue by clicking the fade cue icon in the toolbar or using the keyboard shortcut ⌘7;
  3. If you are using QLab 4.4 or later, the Fade cue will automatically target the Audio cue that was selected. If you are using an earlier version of QLab, manually set the target of the Fade cue by dragging the Audio cue on top of the Fade cue;
  4. Set the master level of the original Audio cue to -INF;
  5. Start the Audio cue by pressing the space bar or clicking on the GO button;
  6. Ensure that Live Fade Preview is on (found under the Tools menu or in the Audio Levels tab of the Fade cue’s inspector) and adjust the master level of the Fade cue to the desired level;
  7. Set the duration of the Fade cue in the action column or the Curve Shape tab of the inspector.

Now, fading in an Audio cue requires starting both the Audio cue and the Fade cue. There are then two main methods that can be used to make the Fade cue start immediately after the Audio cue is triggered.

Method 1 - Auto-Continue

In the cue list, click in the rightmost column of the Audio cue once, to enable auto-continue. This is indicated by a triple-headed arrow:

Auto-continue

Method 2 - Start-All Group

  1. Select the Audio cue and the Fade cue, by clicking on the Audio cue and then shift-clicking on the Fade cue;
  2. Click on the Group cue icon in the toolbar, or use keyboard shortcut ⌘0;
  3. The two cues will be placed inside the newly created Group cue.
  4. You can type a description of the cue in the Q column of the group cue.

Group

If you are going to create fades using this method, it is helpful to set the default mode of Group cues to “Timeline - start all children simultaneously”. You can set this in QLab 4 by visiting Workspace Settings → Cue Templates → Group. In QLab 3, the setting is called “Start all children simultaneously” and it can be found in Workspace Settings → Group.)

Of these two methods, the Group cue method (method 2) has many advantages.

  • It’s easier to see the structure of the cue list;
  • It’s easier to spot auto-continues or auto-follows that have been accidentally created, either by accidental clicking in the continue column, or if using the default keymap accidentally catching the hotkey for creating a continue. (C is dangerously positioned directly above the space bar). Minimizing the number of auto-continues or auto-follows that you’re using makes it easier to scan the entire cue list to ensure that none exist where they shouldn’t.
  • It creates a space in the Group cue description for a title for the cue to be typed, without overwriting the descriptions that are automatically created for the Audio and Fade cues, which again make the whole cue list more readable.

Here’s a screen capture of using method two to create an audio cue with a grouped fade in and a separate fade out, by non ninja means:

So, that took around a minute. A skilled operator might be able to do it in 30 seconds or so.

Now lets do the same thing Ninja Style

With one keystroke (⌃N) the fade in and fade out are created for the selected audio file in about three seconds.

How It Works

A Script cue triggered by a hotkey (⌃N) creates two Fade cues for the selected Audio cue, one which fades the Audio cue in and one which fades it out. The fade in and the Audio cue are then placed in a descriptively named start-all Group.

Here is the AppleScript for the Script cue. To keep your workspace tidy, it’s probably best to put this Script cue a separate cue list.

Thanks to Rich Walsh for the difficult bits of script to move the cues into groups, etc.

set inDuration to 5set fade in duration here
set outDuration to 10set fade in duration here
set minVolume to -60 — Set to match minimum volume set in settings/general
tell application id “com.figure53.QLab.4to tell front workspace
  try
    set audioCue to last item of (selected as list)
    set q number of audioCue to “”
    if q type of audioCue is “Audio” then
      make type “Fade”
      set fadeOutCue to last item of (selected as list)
      set the q number of fadeOutCue to “”
      set cue target of fadeOutCue to audioCue
      set duration of fadeOutCue to outDuration
      fadeOutCue setLevel row 0 column 0 db minVolume
      set stop target when done of fadeOutCue to true
      set q name of fadeOutCue to “Fade out ” & q list name of audioCue &(& outDuration & “s)set audioCueLevel to audioCue getLevel row 0 column 0
      fadeOutCue setLevel row 0 column 0 db minVolume
      moveSelectionUp
      make type “Fade”
      set fadeCue to last item of (selected as list)
      set q number of fadeCue to “”
      set cue target of fadeCue to audioCue
      set duration of fadeCue to inDuration
      fadeCue setLevel row 0 column 0 db audioCueLevel
      audioCue setLevel row 0 column 0 db minVolume
      set cuesToGroup to {audioCue, fadeCue}
      make type “Group”
      set groupCue to last item of (selected as list)
      set mode of groupCue to fire_all
      set q name of groupCue to “Fade in& q list name of audioCue &(& inDuration & “s)repeat with eachCue in cuesToGroup
        set eachCueID to uniqueID of eachCue
        move cue id eachCueID of parent of eachCue to end of groupCue
      end repeat
    end if
  end try
end tell

The script:

  • Has two variables where you can set the time in seconds for the fade in and fade out.
  • Has a variable where you can set the volume that is used as the out volume. Usually this should be the same as what you have set for minimum volume in Workspace Settings → General.
  • Checks to see if the selected cue is an Audio cue.
  • Makes a Fade cue for the fade out and sets its target to the Audio cue.
  • Removes any cue number from that cue.
  • Sets the fade duration.
  • Stores the current level of the Audio cue’s master level to use in the fade in cue in a moment.
  • Sets the Fade cue master to -inf and checks the stop target when done checkbox.
  • Names the new cue.
  • Re-selects the Audio cue.
  • Makes a Fade cue for the fade out under the Audio cue and sets its target to the Audio cue.
  • Removes any cue number from that cue.
  • Sets the fade duration.
  • Sets the level of the Audio cue to -inf, and the level of the fade in cue to the original level of the Audio cue.
  • Names the Group cue to indicate what is going to happen when it is triggered.
  • Selects the Audio cue and the fade in cue.
  • Brings them together in a “start all children simultaneously” Group cue.

The music used in the demos is “Darkness is Coming” by Kevin MacLeod (incompetech.com), licensed under a Creative Commons Attribution 3.0 Unported License.

Creative Commons License