Open Stage Control example in the Cookbook

542 views
Skip to first unread message

nelson d'aires

unread,
Mar 23, 2023, 3:52:25 PM3/23/23
to QLab
Hi,

I'm studying the cookbook tutorial Cross Platform Remote Control and when i open the button matrix.json file in Open Stage Control (v.1.23.0) it gives me this strange result a fader instead a matrix buttons (image below). This is because is the wrong file/configuration in the zip file, or is because is a configuration to an old version of Open Stage Control? Thank you in advance :)
 
Captura de ecrã 2023-03-23, às 19.43.39.png

micpool

unread,
Mar 23, 2023, 4:41:48 PM3/23/23
to QLab
Yes, this needs updating, 

The multipush widget is deprecated in favour of the new matrix widget, which can make a matrix out of any control type, knobs, faders, buttons etc.

If you look at the open stage control widget reference you can easily build a new matrix like  this from scratch.

I’ll post a revised file here tomorrow.

The custom module (sendYourValuesToMe.js) in the first download  in that chapter is also broken and the printed code is incorrect.

The replacement sendYourValuesToMe_v2.js module can be downloaded here:


Unzip before use!


Mic

nelson d'aires

unread,
Mar 23, 2023, 5:45:47 PM3/23/23
to QLab
Once again thank you so much Mic!
I'm already opening the updated file to check what changed in sendYourValuesToMe_v2.js
I will make more readings to try to understand the new Open Stage Control matrix button also :)

micpool

unread,
Mar 24, 2023, 1:44:13 PM3/24/23
to QLab
As Promised, here is a version of the second example that will work with Open Stage Control 1.23.0

Screenshot 2023-03-24 at 17.26.38.png

I think it's probably true to say that Open Stage Control has become much more powerful in the last few years, but at the cost of removing  a lot of the simple to understand parameters of the original versions and replacing them with javascript properties that although more customisable do require a far greater programming knowledge to use.

For many applications the new version of Touch OSC may be easier to use, however the main advantage of Open Stage Control with QLab  remains its ability to run a web server on the same machine as QLab which makes the control panel accessible over a network on multiple devices with a wide range of operating systems,  on platforms supported by Electron, including web browsers (Firefox: version 75 and higher Chromium / Chrome: version 60 and higher). 

Mic
button matrix_v2.json.zip

nelson d'aires

unread,
Mar 25, 2023, 5:40:28 AM3/25/23
to QLab
Thank you Mic! Has i was reading the documentation and also the foruns of Open Stage Control i realized what you have written, Open Stage Control needs javascript knowledge... so is not for "everybody", but powerfull.
I'm seeing in your matrix buttons that you have put /go in the adress: so the out of each button inside matrix will be /go/0 if we press button 0, /go/1 if we press button 1, and so on. I realized that the id value of each is always (?) placed by the software at the end in the address field. I wonder how can i insert the ID of each button in the middle of a osc command like this one (for example): /cue/{MatrixbuttonID}/start.

I will also try the Touch OSC, but like you said, also for me, the main of Open Stage Control is the hability to run a web server on the same machine as Qlab which makes the control panel accessible over a network on multiple devices. thank you!

micpool

unread,
Mar 25, 2023, 6:37:56 AM3/25/23
to QLab
Inserting the id in the middle of the OSC address used to be easy because the multi button widget had a split field for that purpose. Now it doesn’t , I’m trying to work out how you achieve the same thing, but in the meantime….

If the cue list which has the cues you want to start,  isn’t the current cue list, then the go method is almost  functionally identical to the start method.

Mic

nelson d'aires

unread,
Mar 25, 2023, 6:44:45 AM3/25/23
to QLab
i just figured out one solution:
in the props field i tryed this and it works:

{
  "mode": "momentary",
  "address": "/cue/#{$}/start"
}
Captura de ecrã 2023-03-25, às 10.42.55.png

micpool

unread,
Mar 25, 2023, 11:25:10 AM3/25/23
to QLab
Ah yes, brilliant!
And easily adapted  for custom labelling and offsets

{
  "mode": "momentary",
  "address": "/cue/#{$+1}/start",
  "label": "Q#{$+1}"
}

Screenshot 2023-03-25 at 15.22.25.png


Mic

nelson d'aires

unread,
Mar 26, 2023, 5:21:21 AM3/26/23
to QLab
I was looking a way to start the matrix at value 1 (and not 0) and you have found it!
Now i'm trying to give background images to the buttons, for now, i'm just using a folder of images where the session file is saved. 

{
  "mode": "momentary",
  "address": "/cue/#{$+1}/start",
  "label": "Q#{$+1}",
  "css": "background: url(images/#{$+1}-foto.jpeg); background-size: auto 100%; background-repeat: no-repeat; background-position: center"
}

I'm a super fa of Qlab, but for me (i'm a photograher) i miss a kind of interface where i can see thumbnails of the images i put in the Qlab video Cues.

Captura de ecrã 2023-03-26, às 10.14.42.png

nelson d'aires

unread,
Mar 27, 2023, 2:18:02 PM3/27/23
to QLab
Just for sharing.
I made some simple and modest development to the matrix buttons: In the same folder where the open stage control is i created a folder of imagens (1-foto.jpg, 2-foto.jpg, 3-foto.jpg and so on). The buttons are in toggle mode, so on click start cue number and off click panic cue number. in my case this of and on makes sense because i use two projectors, one for horizontal images and the other for vertical images, so this means that in a cue list i have in the horizontal and vertical together (minimum two cues active in same list). 

Captura de ecrã 2023-03-27, às 19.07.59.png

button matrix_v3.json

micpool

unread,
Mar 27, 2023, 3:17:33 PM3/27/23
to QLab
Very good,
One thing you might want to consider is re-enabling the line
props.address = "/cue/"+[$+1]+"/start"

This then allows you to control the illumination of the buttons with 
/cue/1/start #/cue/1/isRunning#
/cue/2/start #/cue/2/isRunning# etc.

So if the QLab cues are operated in OStageC,  operated in QLab, are panicked, or a cue ends,  the button state in OStageC will show which cues are running.

It may be possible to parse cue updates from QLab in OStageC, or as a quick simple solution you could try adapting  the sendMeYourValiues custom module to trigger a group with as many OSC cues as you have buttons to send the running stats of the QLab cues

Attached is a screen recording which just uses a looping timeline group in QLab  to send the running status values  of cues 1 to 3.

Mic

Screen Recording 2023-03-27 at 20.12.38.mov

nelson d'aires

unread,
Mar 28, 2023, 7:00:22 AM3/28/23
to QLab
wow, never thought that this is possible, i already tested it and i love it!

"It may be possible to parse cue updates from QLab in OStageC, or as a quick simple solution you could try adapting  the sendMeYourValiues custom module to trigger a group with as many OSC cues as you have buttons to send the running stats of the QLab cues"
i do not know if i understand what you have written but i will for sure read more and make experiments :)

nelson d'aires

unread,
Mar 29, 2023, 10:20:43 AM3/29/23
to QLab
"It may be possible to parse cue updates from QLab in OStageC, or as a quick simple solution you could try adapting  the sendMeYourValiues custom module to trigger a group with as many OSC cues as you have buttons to send the running stats of the QLab cues"
today i made the implementation and the test went well. But, as soon i put 125 network (i made a script to create the network cues from the selected video cues ) cues to sent (cue/X/start #/cue/X/isRunning# ) the qlab4 started to get slugish... i do not know if in qlab5 is different. The concept is super good, i wonder if there is another approach...

micpool

unread,
Mar 29, 2023, 10:24:53 AM3/29/23
to QLab
How are you triggering the group containing the network cues. and How many times a second are you triggering the group?

Mic

nelson d'aires

unread,
Mar 29, 2023, 10:30:45 AM3/29/23
to QLab
The triggering is made by OStageControl custom module, i've used your sendMeYourValues_V2.js 
// Do whatever you want, initialize some variables, declare some functions, ...
var heartbeatEnabled = false,
heartbeat = setInterval(()=>{
if (heartbeatEnabled) {
sendOsc({
address: '/cue/sendToOStageC/start',
host: '127.0.0.1',
port: 53000

})
}
}, 250)

The group and the cues inside have the Pre-Wait 00.00.000 

micpool

unread,
Mar 29, 2023, 11:17:43 AM3/29/23
to QLab
So you are currently sending 150 messages 4 times a second.
Change the 250 in the last line to 500 or 1000, and see if that stops it being sluggish, at the cost of a slightly slower update.
(250 works fine with QLab5 on my Mac M1 Studio)

Otherwise you need to do it properly, just updating as necessary, by using the full bidirectional protocol  for status updates and decoding the dictionaries  QLab sends inside Open Stage Control.

 I haven't investigated the practicality of this but I imagine it would be quite time consuming to do, but it  is well documented in the first few sections of the  QLab OSC dictionary.

Mic

nelson d'aires

unread,
Mar 29, 2023, 2:08:01 PM3/29/23
to QLab
yup, i was sending 127 messages 4 times a second. I've tried to increase the time interval, but in my case is the same: A group (mode: timeline) with 127 network cues it slower's down a lot the performance of  Qlab in my computer  (Macbook pro 15" 2.5GHz quad-core Intel Core i7 processor 16GB memory ram)
Well, but thats fine, i like to know that this is a proof of concept and now i will read more about it, and case by case investigating how to update as necessary  using using the full bidirectional protocol :)
thank you so much!

micpool

unread,
Mar 29, 2023, 2:27:22 PM3/29/23
to QLab
One other thing, you may get an improvement if the timeline group is not in the current cue list.



Mic. 

nelson d'aires

unread,
Mar 31, 2023, 6:25:22 AM3/31/23
to QLab
That helped a little yes! 
Another thing that also helped was turning off Bitfocus Companion. Despite this is not a possibility for me, for now, it was good to identify some causes :)

Reply all
Reply to author
Forward
0 new messages