"Show Control Cue Generator" script not working on Qlab5

147 views
Skip to first unread message

Kota Watanabe

unread,
May 3, 2023, 11:08:49 PM5/3/23
to QLab
Hi! I'm Kota.
I'm working in Japan, and mainly using Resolume as Video Server.

Recently, I tried to trigger Columns on Resolume via OSC.
So, I want to make a series of OSC cues on Qlab.

e.g.)
[Cue1] /composition/columns/1/connect
[Cue2] /composition/columns/2/connect
[Cue3] /composition/columns/3/connect
……

Making a series of osc cues on Qlab, I discovered some wonderful scripts on the Qlab homepage.
https://qlab.app/cookbook/show-control-cues-generator/
However, the script couldn't run on my Qlab5.
How to make this script works?
Please advise.

Thank you.

micpool

unread,
May 4, 2023, 5:41:57 AM5/4/23
to QLab
Hi Kota

Yes, much of the Cookbook doesn't work with QLab 5.

The major difference with network cues between QLab 4 and 5 is that the message type  is  set in the pop up in Settings/Network/Network outputs.

This pop up contains customised message lists for a range of hardware and software devices, but these do not include Resolume (Arena or Avenue), and even if it was included you would still set the pop up  to OSC message to use with the current  cue generator scripts

Set up Settings/Network/Network outputs like this:

Screenshot 2023-05-04 at 09.38.30.png

and delete this from the script  Create OSC List From Template with incrementing value replacing $$$

if the osc message type of cue "OSCT" is not custom then
display dialog "This generator only makes lists from Custom OSC Messages"
return
end if

and also

set the osc message type of theselectedcue to custom

custom message will work for the moment but is deprecated so may not work  in future versions. Replace custom message with custom string
set the custom string of theselectedcue to thecustommessage

Although Patch is in the QLab 5 AppleScript dictionary for network cues, it does not work, and is marked as deprecated. Use network patch number instead

Change

set the thedestinationpatch to  patch of cue "OSCT"
to
set the thedestinationpatch to network patch number of cue "OSCT"

and
set the patch of theselectedcue to thedestinationpatch

to

set the network patch number of theselectedcue to thedestinationpatch

There is an proof reading error in this script which is normally skipped over because it is contained within the try block

DELETE
set the q_num of theselectedcue to theindex as string
 
As the QLab 5 default name of the network cue contains the network patch name you can delete
 
display dialog "Device Name for Q Name Text:" default answer ""
if button returned of result = "cancel" then
return
else
set thedevicename to (text returned of result) as string
end if


and

set the q name of theselectedcue to thedevicename & " OSC  " & q default name of theselectedcue

The complete script for QLab 5:


--QLab5 Version

--Create OSC List From Template with incrementing value replacing $$$

--Run in separate process should not be checked


display dialog "Number of cues to generate:" default answer "100"

if button returned of result = "cancel" then

return

else

set therepeat to (text returned of result) as integer

end if

display dialog "Starting value for variable?" default answer "1"

if button returned of result = "cancel" then

return

else

set theindex to (text returned of result) as real

end if

display dialog "Increment?" default answer "1"

if button returned of result = "cancel" then

return

else

set theincrement to (text returned of result) as real

end if

display dialog "Integer value format" buttons {"1", "1.0"} default button "1"

set integertype to button returned of result


tell front workspace

try

set the thedestinationpatch to network patch number of cue "OSCT"

repeat therepeat times

make type "network"

set theselectedcue to last item of (selected as list)

set the q number of theselectedcue to ""

set the network patch number of theselectedcue to thedestinationpatch

set thecustommessage to the custom message of cue "OSCT"

set AppleScript's text item delimiters to "$$$"

set the item_list to every text item of thecustommessage

if theindex mod 1 is 0 and integertype is "1" then

set AppleScript's text item delimiters to (theindex as integer) as string

else

set AppleScript's text item delimiters to theindex as string

end if

set thecustommessage to the item_list as string

set AppleScript's text item delimiters to ""

set the custom string of theselectedcue to thecustommessage

set theindex to theindex + theincrement

end repeat

end try

end tell


Set up cue OSCT like this:

Screenshot 2023-05-04 at 10.06.27.png

and everything should now work

Screen recording attached

Mic
Screen Recording 2023-05-04 at 10.32.10-HD 1080p.mov

Sam Kusnetz

unread,
May 4, 2023, 2:14:00 PM5/4/23
to ql...@googlegroups.com
On May 4, 2023 at 5:41:57 AM, micpool <m...@micpool.com> wrote:
Yes, much of the Cookbook doesn't work with QLab 5.

We are slowly but surely updating cookbook articles to work with QLab 5.

The Show Control Cues Generator is in progress right now.

Best
Sam

Sam Kusnetz (he/him) | Figure 53


Kota

unread,
May 5, 2023, 12:13:21 AM5/5/23
to QLab
Thank you, Mic.
The script works perfectly on my PC now.
Thanks for your quick and detailed reply!

In addition, I'm happy to hear that the Cookbook will be up to date soon.
Thanks, Sam!

Kota
2023年5月5日金曜日 3:14:00 UTC+9 sam kusnetz:
Reply all
Reply to author
Forward
0 new messages