OSC Number shift for using Resolume

212 views
Skip to first unread message

Tommy

unread,
Jul 23, 2022, 9:17:08 PM7/23/22
to QLab

Hi there!

I am controlling the projection image in a theater performance by sending OSC from QLab4 to Resolume Arena 7.

For example the following cue :
/composition/layers/{LayerNumber}/clips/{ColumnNumber}/connect

And, I insert columns in Resolume to accommodate changes and additions in rehearsal, but the {ColumnNumber} in QLab will shift too, so I have to rewrite the numbers one by one. This is fine for 10 or 20 cues, but when the number of queues is 200 or 300, it is terrifying...

Is there any way to use a script to shift only the numbers in the {ColumnNumber} of all after the specified cues by +1 at once?

Message has been deleted
Message has been deleted

Taylor Glad

unread,
Jul 23, 2022, 11:57:02 PM7/23/22
to QLab
Corrected the display dialog to be clearer. (Pardon the previously deleted emssages)

Select the cues you want to adjust, then run the script.
It will ask you for an example OSC string so it knows where in the string to increment the values.

I ended up just making the script just count the sections between "/"s and which slot the value should be incremented.
So you could put "/1/1/1/1/^/1" or "/Hufflepuff/%/$/zzzz/^/#tomateos" for your example, and it would know which part to increment.

Because of that, this script only works for cases like yours where the number has "/" on either side, but that should be the 99% of cases.



--OSC Increment Values of selected cues

tell application id "com.figure53.QLab.4" to tell front workspace
    set thetids to AppleScript's text item delimiters
    set theSelection to selected as list
   
    display dialog "Enter the OSC message you whose numbers you'd like to increment, replacing the numbers to increment with a \" ^ \"." default answer "/composition/layers/1/clips/^/connect" with title "OSC String" with icon 1
    set OSCString to text returned of result
   
    display dialog "How much do you want to increment the values? Use negative numbers to reduce." default answer "1" with title "Increment Value" with icon 1
    set OSCInc to text returned of result
   
    set AppleScript's text item delimiters to "/"
    set OSCString to every text item of OSCString
    set IncList to {}
   
    repeat with a from 1 to count of OSCString
        if item a of OSCString is "^" then
            set end of IncList to a
        end if
    end repeat
   
    set cueChangeCount to 0
    repeat with eachCue in theSelection
       
        if the q type of eachCue is "network" then
            if the osc message type of eachCue is custom then
                set theOSCMessage to the custom message of eachCue
                set theTextItems to every text item of theOSCMessage
                set cueChanged to false
                repeat with eachItem from 1 to count of theTextItems
                    if eachItem is in IncList then
                        set item eachItem of theTextItems to (item eachItem of theTextItems) + OSCInc
                        set cueChanged to true
                    end if
                end repeat
               
                if cueChanged then set cueChangeCount to cueChangeCount + 1
                set the custom message of eachCue to theTextItems as string
            end if --the message type is custom
        end if --the q type is "network"
       
    end repeat -- eachCue in theSelection
    set AppleScript's text item delimiters to thetids
    display dialog (cueChangeCount as string) & " cues changed" with title "OSC Value Increment" with icon 1
end tell

micpool

unread,
Jul 24, 2022, 1:13:38 AM7/24/22
to QLab
Why do you need to keep the columns sequential in Arena? just add a column at the end

Of course, the main problem with OSC control of Arena is that you can rename a column e.g to Sc3.5 but can't use that name in an OSC address. This is an absurd omission. It would be like QLab insisting that OSC messages could only address cues by their row position in a cue list, instead of their cue number string.

Mic

Olivier OLRY

unread,
Jul 24, 2022, 3:19:16 AM7/24/22
to ql...@googlegroups.com
Hi there,
I’m looking for a script to refold all my Group Cues, as a Pre-Show Cue, and also a script that permit me to close all Finder windows opened…
Is there scripts to do this ?
Thank you for all the help you would give me 

Olivier Olry

Le 24 juil. 2022 à 03:17, Tommy <selfimag...@gmail.com> a écrit :


--
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/a337d0de-6d82-444d-8f83-fa93378136fcn%40googlegroups.com.

Tommy

unread,
Jul 24, 2022, 6:16:46 AM7/24/22
to QLab
Thank you!!! I'll give it a try!

Tommy

unread,
Jul 24, 2022, 6:34:23 AM7/24/22
to QLab

Yes, I know. I had always added the scene revisions together towards the end of the column. I was free to layout them, in whatever column I wanted.

However, due to the impact of COVID-19 in no small part, it has become necessary to take into account the case that the video operator has to be changed in the middle of the tour, so that the operator who takes over can understand the whole sequence as easily as possible. So, I began to think that it would be better to organize the scenes in order from the front of the column as much as possible.

Originally, we would like Resolume to implement custom OSC input, but currently I think it may be faster to change the QLab queue in bulk at present, and are asking how to do that.

Thanks.

Tommy

unread,
Jul 24, 2022, 11:42:25 AM7/24/22
to QLab
Hi Taylor,
Your script is exactly what I needed. It worked fine!
I will localize some dialogs into Japanese and use them.
Thank you so much!

On Sunday, July 24, 2022 at 12:57:02 PM UTC+9 taylo...@gmail.com wrote:

Tommy

unread,
Aug 30, 2022, 2:42:25 PM8/30/22
to QLab
Hello.
I am testing QLab5, but I am unable to run the script shared in this thread with the following error;

ERROR: Expected "then", etc. but found property.

It worked fine until 4.7.
Has the specification changed?
How should I rewrite it?

qlab5_script_error.png
2022年7月25日月曜日 0:42:25 UTC+9 Tommy:

Sam Kusnetz

unread,
Aug 30, 2022, 3:04:36 PM8/30/22
to ql...@googlegroups.com
Hi Tommy

The way Network cues work in QLab 5 has changed, so the AppleScript nomenclature has changed with it.

In QLab 4, Network cues could be set to one of three modes: OSC message, QLab message, or UDP message. In AppleScript, this was the “osc message type” of the cue.

In QLab 5, Network cues themselves don’t have any modes. Instead, network patches dictate what sort of message should be sent by the cues that use that patch.

The simplest option for you is to simply remove this nested “if” statement, so the script would change from:

if the q type of eachCue is “network” then
if the osc message type of eachCue is custom then
{the rest of the script}
end if
end if

to:

if the q type of eachCue is “network” then
{the rest of the script}
end if

That should work nicely, but if you have a variety of Network cues in your workspace that all do different things, this might not be precise enough for you. If that’s the case, you can test to make sure that eachCue is using the appropriate network patch:

if the q type of eachCue is “network” then
if the network patch name of eachCue is “the name of the network patch" then
{the rest of the script}
end if
end if

Obviously, you’ll use the actual name of the network patch instead of “the name of the network patch.”

Happy scripting!
Sam


Sam Kusnetz (he/him) | Figure 53



On Aug 30, 2022 at 2:42:25 PM, Tommy <selfimag...@gmail.com> wrote:
Hello.
I am testing QLab5, but I am unable to run the script shared in this thread with the following error;

ERROR: Expected "then", etc. but found property.

It worked fine until 4.7.
Has the specification changed?
How should I rewrite it?


Tommy

unread,
Aug 30, 2022, 3:18:30 PM8/30/22
to QLab
Thanks Sam!
The script is back in my hands!

2022年8月31日水曜日 4:04:36 UTC+9 sam kusnetz:
Reply all
Reply to author
Forward
0 new messages