Script doesn't work in Qlab 5

110 views
Skip to first unread message

José Miguel Mayoral

unread,
Apr 28, 2023, 3:52:42 PM4/28/23
to QLab
Hi. 
'm using a script in Qlab 4 that works perfectly but in Qlab 5 it doesn't, what could be the problem?

Sam Kusnetz

unread,
Apr 28, 2023, 5:52:07 PM4/28/23
to ql...@googlegroups.com
On Apr 28, 2023 at 3:52:41 PM, José Miguel Mayoral <mode...@gmail.com> wrote:
'm using a script in Qlab 4 that works perfectly but in Qlab 5 it doesn't, what could be the problem?

Without seeing the script, and probably hearing more about the specifics of how you’re using it and what behavior you’re observing, there’s no way we can help you.

Sam
Sam Kusnetz (he/him) | Figure 53


José Miguel Mayoral

unread,
May 1, 2023, 6:05:15 AM5/1/23
to QLab
This is the script:

set inDuration to 1 --set fade in duration here

set outDuration to 1 --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 thecue to last item of (selected as list)

set q number of thecue to ""

if q type of thecue is "Audio" or q type of thecue is "video" 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 thecue

set duration of fadeOutCue to outDuration

set stop target when done of fadeOutCue to true

set q name of fadeOutCue to "Fade out " & q list name of thecue & " (" & outDuration & "s)"

set audioCueLevel to thecue getLevel row 0 column 0

if q type of thecue is "video" then

set thecueopacity to the opacity of thecue

set the opacity of fadeOutCue to 0

set the do opacity of fadeOutCue to true

end if

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 thecue

set duration of fadeCue to inDuration

fadeCue setLevel row 0 column 0 db audioCueLevel

thecue setLevel row 0 column 0 db minVolume

if q type of thecue is "video" then

set the opacity of fadeCue to thecueopacity

set the opacity of thecue to 0

set the do opacity of fadeCue to true

end if

set cuesToGroup to {thecue, 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 thecue & " (" & 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

José Miguel Mayoral

unread,
May 1, 2023, 6:12:24 AM5/1/23
to QLab
In qlab 4 it works perfectly but when I copy it to Qlab 5, it compiles but when I assign a trigger to it and apply it to a video it doesn't create the fade.

micpool

unread,
May 1, 2023, 6:54:29 AM5/1/23
to QLab
Usual drill. Comment out the --try  --end try and QLab will tell you what is wrong.

In this case "The variable fire_all is not defined." You will also see that it's coloured green, which means QLab 5 is treating it as a common variable and not a constant for mode

The constant for a QLab 4 fire_all is timeline

In QLab 4 both constants work, but fire_all is actually the QLab 3 constant (which is probably what that script was originally written for) and is deprecated in QLab 5


Mic

José Miguel Mayoral

unread,
May 1, 2023, 9:35:52 AM5/1/23
to QLab
How should I modify the script to make it work in Qlab 5?

Sam Kusnetz

unread,
May 1, 2023, 11:58:21 AM5/1/23
to ql...@googlegroups.com
On May 1, 2023 at 9:35:51 AM, José Miguel Mayoral <mode...@gmail.com> wrote:
How should I modify the script to make it work in Qlab 5?

Change this line:

set mode of groupCue to fire_all

to:

set mode of groupCue to timeline


Best

José Miguel Mayoral (Mayo)

unread,
May 1, 2023, 12:10:48 PM5/1/23
to ql...@googlegroups.com
Thank you!!

--
Contact support anytime: sup...@figure53.com
Follow QLab on Twitter: https://twitter.com/QLabApp
User Group Code of Conduct: https://qlab.app/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "QLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qlab+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qlab/CAOOK5AYucLrjSBxN1KMOSguwVhagtfMcWPbotXFju1wj5-G5eA%40mail.gmail.com.


--
José Miguel Mayoral Samaniego (Mayo)
Técnico audiovisual     +34 678 409 803

José Miguel Mayoral (Mayo)

unread,
May 2, 2023, 12:32:30 PM5/2/23
to ql...@googlegroups.com
Now I have a problem. I need a script to auto crossfade between any video. For example. I was on video number 7 and when I clicked on video 1 of the cue list, 7 would fade out and stop.
Reply all
Reply to author
Forward
0 new messages