Send inputs to QLC+ from another program

Post Reply
StraToN
Posts: 6
Joined: Thu Dec 03, 2015 2:16 pm
Real Name: Julian Murgia

Hello,

First I would like to precise that I am only a programmer, I know almost nothing about shows lighting. I have the little basics about DMX stuff, but I never touched it myself. So I apologize if the present post (and next ones) are unclear.

I am looking for information regarding the control of Lights Sequences from another program. Let me explain the idea.
I am developing an integrated product which consists in:
- a tactile table
- a computer
- software: to be simple, a video game.

My "client" asked me if it would be possible to attach a scene lighting equipment to the device (say for example, 4 RGB light projectors and 1 strobe, very simple), in order to activate certain light sequences according to events happening in the game. For example, if the game is over, the strobe would be activated for a few seconds.

My first thought is to define these sequences in QLC+, and activate them when needed, by sending (inputting) QLC+ the command to do so. My question is: is that possible? If it is not, is there another way to do this?

To be precise, I am developing this game(s) using the Godot Editor (www.godotengine.org). If this is the good solution, I'd develop a module for this engine, allowing people to send commands to QLC+.

Maybe another solution would be to bypass QLC+ in my case and directly send DMX commands to lights (using OLA, maybe?), but it would then be difficult to define the sequences.

What do you think?
Thanks a lot for your precisions.

Regards
plugz
Posts: 637
Joined: Sun Apr 12, 2015 6:30 pm
Real Name: David

Hello,
StraToN wrote:My first thought is to define these sequences in QLC+, and activate them when needed, by sending (inputting) QLC+ the command to do so. My question is: is that possible? If it is not, is there another way to do this?
Yes it is possible. You have to be able to send OSC or ArtNet or E1.31 packets to QLC+ (all three are protocols over UDP).
StraToN wrote:Maybe another solution would be to bypass QLC+ in my case and directly send DMX commands to lights (using OLA, maybe?), but it would then be difficult to define the sequences.
I think using QLC+ for this will be pretty straighforward, plus it will be easy to change the sequences you want to run.
StraToN
Posts: 6
Joined: Thu Dec 03, 2015 2:16 pm
Real Name: Julian Murgia

plugz wrote:Yes it is possible. You have to be able to send OSC or ArtNet or E1.31 packets to QLC+ (all three are protocols over UDP).
Amazing! Godot already has UDP support, so I guess it'd be easy to send OSC packets through it to QLC+, as long as they are formatted correctly.

According to documentation:
OSC packets are composed to obtain a OSc path like the following: /(QLC+ universe - 1)/dmx/(DMX channel - 1)
I don't really know how to set the values to be transmitted in this packet example though. And also, it appears to be DMX data, which I thought were managed by QLC+ itself ; I would like to input QLC+ with a sequence ID, which it then transfers to lights. But maybe I didn't understand well how all this works.
Thanks a lot for your explanations !
plugz wrote:
StraToN wrote:Maybe another solution would be to bypass QLC+ in my case and directly send DMX commands to lights (using OLA, maybe?), but it would then be difficult to define the sequences.
I think using QLC+ for this will be pretty straighforward, plus it will be easy to change the sequences you want to run.

I agree. I would prefer a lot leaving the "light programming" task to QLC+. QLC+ does it, and it appears to do it well. That way, it is indeed possible to change the sequences later if we want to.
User avatar
mcallegari
Posts: 4481
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

OSC packets are composed to obtain a OSC path like the following: /(QLC+ universe - 1)/dmx/(DMX channel - 1)
That's for packets going OUT of QLC+.
You missed the most important piece of the documentation as it says:
OSC output packets are composed to obtain a OSC path like the following: /QLC+ universe - 1/dmx/DMX channel - 1
You need to output from Godot (and receive in QLC+), so you can choose any format you like. For example: /light1/channel1, /scene1/toggle, /sequence5/toggle, etc..
OSC (or other plugin) data is normally used to trigger a QLC+ Virtual Console widget action, like a button on/off or a slider value.
In your case I guess you just need to design some Scenes/Chasers/Shows and attach them to VC buttons. Then trigger them via OSC.

I suggest you to watch my video tutorials. At least #1, #2 and #4

Note also that there are Web APIs if you prefer to use local websockets. A demo page is here:
http://www.qlcplus.org/Test_Web_API.html

Since you mentioned Godot, do you have OpenGL skills or are you more into 2D stuff ? In case, there might be a job for you in QLC+.
Please send me an email if you are interested.
StraToN
Posts: 6
Joined: Thu Dec 03, 2015 2:16 pm
Real Name: Julian Murgia

mcallegari wrote:
OSC packets are composed to obtain a OSC path like the following: /(QLC+ universe - 1)/dmx/(DMX channel - 1)
That's for packets going OUT of QLC+.
You missed the most important piece of the documentation as it says:
OSC output packets are composed to obtain a OSC path like the following: /QLC+ universe - 1/dmx/DMX channel - 1
You need to output from Godot (and receive in QLC+), so you can choose any format you like. For example: /light1/channel1, /scene1/toggle, /sequence5/toggle, etc..
OSC (or other plugin) data is normally used to trigger a QLC+ Virtual Console widget action, like a button on/off or a slider value.
In your case I guess you just need to design some Scenes/Chasers/Shows and attach them to VC buttons. Then trigger them via OSC.
Oh, oops. I actually did see that it was output packets, however I thought they were the same. So I can actually map my Godot-outputted packets as I want and connect them to a Scene/Show/etc, that's exactly it.
mcallegari wrote:I suggest you to watch my video tutorials. At least #1, #2 and #4
It is indeed useful, I should have done this before and I was actually watching them since your last answer, which motivated me to learn how to use QLC+ since I'll have to design Scenes and Shows for this project :) .
mcallegari wrote:Note also that there are Web APIs if you prefer to use local websockets. A demo page is here:
http://www.qlcplus.org/Test_Web_API.html
I'll have to dive more into Godot's UDP way of functionment to see if I need local websockets. I'll check this page anyway, thanks !
mcallegari wrote:Since you mentioned Godot, do you have OpenGL skills or are you more into 2D stuff ? In case, there might be a job for you in QLC+.
Please send me an email if you are interested.
My OpenGL skills are old. I plan on read OpenGL book to gain better competence with it. Godot is made to avoid game developers having to put their hands in that dirty, low-level OpenGL code they would normally have to do in order to display stuff on screen. Godot allows this, but not only, ofc.
Thank you for your proposition though, but I'm afraid I'll be a little bit too busy for now, even if that sounds interesting. Just for knowing, what do you want to achieve with OpenGL in QLC+?
User avatar
mcallegari
Posts: 4481
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Just for knowing, what do you want to achieve with OpenGL in QLC+?
3D preview of course ! :)
StraToN
Posts: 6
Joined: Thu Dec 03, 2015 2:16 pm
Real Name: Julian Murgia

mcallegari wrote:
Just for knowing, what do you want to achieve with OpenGL in QLC+?
3D preview of course ! :)
Heh, that's what I thought :) Not that easy though.
That would indeed be great. Contest's Sweet Light software seems to have this feature already.
User avatar
mcallegari
Posts: 4481
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

That would indeed be great. Contest's Sweet Light software seems to have this feature already.
...as many others...but...most of them are Windows-only and the best of them are very expensive.
I want to provide the first cross platform and open source solution.

If you happen to know a skilled OpenGL developer, please let me know. Very soon I will start to code that part.
StraToN
Posts: 6
Joined: Thu Dec 03, 2015 2:16 pm
Real Name: Julian Murgia

mcallegari wrote:
That would indeed be great. Contest's Sweet Light software seems to have this feature already.
...as many others...but...most of them are Windows-only and the best of them are very expensive.
I want to provide the first cross platform and open source solution.

If you happen to know a skilled OpenGL developer, please let me know. Very soon I will start to code that part.
FLOSS is best :)

I'll ask on Godot's IRC if someone is interested. Is it better to be a QLC+ user already? Even if your video tutorials are honestly enough to understand the power of this software. Or even interested in Light management?
Do you have an idea on how you want to do it? Integrate an existing 3D engine, or make yourself one (Qt provides classes for this) ?
User avatar
karrika
Posts: 60
Joined: Tue May 12, 2015 6:50 am
Real Name: Karri Kaksonen

KiCad has a nice set of 3D objects. A SMD 1206 resistor can be tied to a vrml model. When you place and turn the resistor the 3D model does the same.

It would be nice to keep things very fundamental so that people don't have to dig into OpenGL shaders too much. We could create some shaders for color, lighting and alpha masking of texture blit and build the models on top of that.
StraToN
Posts: 6
Joined: Thu Dec 03, 2015 2:16 pm
Real Name: Julian Murgia

Hello,

Coming back about the project I described at first post.

To begin, I created a simple interface with 3 buttons "Red", "Green" and "Blue".
godot_interf.png
godot_interf.png (11.01 KiB) Viewed 1250 times
Each button sends respectively on UDP 127.0.0.1, port 7700, these strings : "/1/toggle1", "/1/toggle2" and "/1/toggle3"

QLC+ is running on the same machine. Here is its configuration for OSC :
qlc_config.png
I'm trying to create a profile for this program, using the automatic discovery function (button with a magic wand) in the Input Profile Editor. However, while this function is active, my attempts of clicking the 3 buttons of my interface don't seem to be recognized by QLC+. However, in the Mapping tab, the OSC line does show "packet received" number, which was incremented at each click.

I think I am missing something here. Maybe it is a problem with my messages that are sent to QLC+ ? Is there a way for QLC+ to display somewhere (in the terminal output maybe, I use Linux) what was the content of the received packet?

Thanks for any help you can provide !

edit : apparently, it is not sufficient to send a string respecting OSC path over UDP. The UDP packet has to respect OSC protocol, so I guess I'll have to dig further.
plugz
Posts: 637
Joined: Sun Apr 12, 2015 6:30 pm
Real Name: David

Post Reply