How long is this Qlab Playlist?
TL;DR:
Calculate how long a list of songs is in Qlab.
The Story:
In my early days of sound design, I would play my house music in iTunes. What could be easier? It was a drag and drop interface I knew well, and people who weren’t me could also control/change it. Of course, as I cultivated the audience’s experience more and put more time into my playlists, I switched to playing even this music in Qlab. This gave me so much more control. However, the one thing I missed was the bottom of the iTunes window giving me the length of my playlist. The House is supposed to open 30 minutes before the show starts – but what if we have to hold the start of the performance? Will I have enough music? I needed to restore this functionality, and here is how I did it.
The Esoteric Bit:
Create a script cue, and call it “<HK> Total time of selected cues”. The <HK> part of it is a visual indicator that I use, to tell me that the cue is invoked via a hotkey trigger. I also put in the Number column what that hotkey will be, as a reminder.
In the script tab, enter the following code:
tell application id “com.figure53.qlab.3” to tell front workspace
set totalSeconds to 0
set thisSeconds to 0
repeat with eachCue in (selected as list)
try
set thisSeconds to (duration of eachCue)
set totalSeconds to thisSeconds + totalSeconds
end try
end repeat
set h to totalSeconds div 3600
set s to totalSeconds – h * 3600
set m to s div 60
set s to s – m * 60
if h < 10 then
set h to text -2 thru -1 of (“00” & h)
else
set h to h as text
end if
if m < 10 then set m to text -2 thru -1 of (“00” & m)
if s < 10 then set s to text -2 thru -1 of (“00” & s)
set prettySeconds to (h & “:” & m & “:” & s)
display dialog “The total time of the selected cues is ” & prettySeconds with title “Total Time” with icon 1
end tell
There is a lot happening there under the hood. Suffice it to say, it’s adding up the length of the audio files in question.
Under the Basics tab, assign a hotkey trigger. It can be whatever you want, but remember to avoid anything already assigned in Qlab’s preference panes.
To execute the script, highlight all of the songs you want to add up, and then hit the hotkey you programmed. You’ll get a popup like this:
And now you know if you have enough music to cover the time the doors open to show start, or intermission, whatever. As I have written about elsewhere, I have a number of these types of hokey scripts that I use, and I keep them in a separate Cue List so I can refer to them and keep them out of my way in the main Cue List.
I would like to give special thanks to designer extrordinare Mic Pool and the community at the Qlab Users Group (https://groups.google.com/forum/m/#!forum/qlab), who developed the script. I don’t remember exactly who did, but they get the credit for the coding part. I just worked it into my workflow, that I am sharing here!
Cheers!
-brian