Setting the audio level of all cues in a nested group

152 views
Skip to first unread message

j hydroplant

unread,
Oct 25, 2021, 8:33:07 AM10/25/21
to QLab
I'm trying to get a script working that sets the level of output 3&4 of all the cues in a group. The group contains many nested groups, and groups within that, so i'm wondering how you tell Qlab to look at everything contained in the parent group?

This is what I have so far. It works if the cues are in the parent group called CUENUMBER but doesn't work for the cues contained within that group, if you get my drift....

tell application id "com.figure53.QLab.4" to tell front workspace
    set thecues to cues of cue "CUENUMBER"
    repeat with eachcue in thecues
        if q type of eachcue is in {"Audio", "Video"} then
            eachcue setLevel row 0 column 3 db -10
            eachcue setLevel row 0 column 4 db -10
            set armed of eachcue to true
        end if
    end repeat
end tell

Rich Walsh

unread,
Oct 25, 2021, 8:55:48 AM10/25/21
to ql...@googlegroups.com
I've used variations of this a few times:

tell application id "com.figure53.QLab.4" to tell front workspace
set cuesToProcess to (selected as list)
set selectedCount to count cuesToProcess
set i to 0
repeat until i = (count cuesToProcess)
set eachCue to item (i + 1) of cuesToProcess
if q type of eachCue is "Group" then
set cuesToProcess to cuesToProcess & cues of eachCue
end if
set i to i + 1
end repeat
repeat with eachCue in cuesToProcess
if q type of eachCue is not "Group" then
-- Do something
end if
end repeat
end tell

It should generate a list (cuesToProcess) of all selected cues and all their children, and all their children's children, and so on all the way down.

Sometimes it's quicker when doing something with levels to have what you want on a hotkey as an OSC command, unfold the cues, select them all, run the hotkey. Setting a Group Cue to armed will set all its children (etc) to armed too.

Rich

j hydroplant

unread,
Oct 25, 2021, 9:30:18 AM10/25/21
to QLab
Thanks, that works perfectly, I had to modify it slighty to do what I wanted:

tell application id "com.figure53.QLab.4" to tell front workspace
    set cuesToProcess to cues of cue "CUENUMBER"

    set selectedCount to count cuesToProcess
    set i to 0
    repeat until i = (count cuesToProcess)
        set eachcue to item (i + 1) of cuesToProcess
        if q type of eachcue is "Group" then
            set cuesToProcess to cuesToProcess & cues of eachcue

        end if
        set i to i + 1
    end repeat
    repeat with eachcue in cuesToProcess

        if q type of eachcue is in {"Audio", "Video"} then
            eachcue setLevel row 0 column 3 db -120
            eachcue setLevel row 0 column 4 db -120

        end if
    end repeat
end tell

j hydroplant

unread,
Jun 6, 2024, 5:54:48 AMJun 6
to QLab
I've been using 2 of these scripts set to either 0 or -120 to successfully as a quick mute/unmute of projects, this works really well but recently I am doing a project where the videos have very extreme sound. How could I loop this cue in a way that still sets the level but achieves more of a fading in and out effect so as to give the technicians some warning

Also to shutter off the video I have been just fading a black png over the top, this obviously requires me to remember to set the layers correctly when i'm adding new videos so they don't appear on top when they start behind the black curtain... Is there something like setOpacity that I can throw into the same script to go from 100% to 0% and visa versa?
Reply all
Reply to author
Forward
Message has been deleted
0 new messages