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:
-INF and click the checkbox labeled
stop target when done (unless you are going to fade the Audio cue back up
later.)To make a fade in:
-INF;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.
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:
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.
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.
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.
applescriptset inDuration to 5 –set fade in duration here set outDuration to 10 –set fade in duration here set minVolume to -60 — Set to match minimum volume set in settings/general tell application id “com.figure53.QLab.4” to 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:
-inf and checks the stop target when done
checkbox.-inf, and the level of the fade in cue to
the original level of the Audio 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.