QLC+ API Python

Ask a generic question about the usage of QLC+, not related to a particular operating system
Post Reply
LukHan
Posts: 4
Joined: Mon Jun 10, 2024 6:38 pm
Real Name: Lukas Hanisch

Hey,

hope someone can give me an overview. I try to control my light via Python. I found a workaround with the webAPI and a program called "postman". I would like to start/stop and also manipulate programs within Python to trigger the light based on decision made by a neural network.

Is there a kind of "live consol" wich I can use with c++?

Maybe someone recommend OLA? It seems like there is an integrated Python API for OLA.

Thanks for help!
User avatar
mcallegari
Posts: 4710
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

[moderator] please read the "community" section description before posting. It's definitely the wrong place to post a support request. Moving to the proper area.
User avatar
GGGss
Posts: 3052
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

LukHan wrote: Sun Jul 07, 2024 4:18 pm to trigger the light based on decision made by a neural network.
You got my attention now. ;-) I did create quite some solutions for when venue visitors transited from the foyer to the ballroom, mostly by using infrared detectors.
LukHan wrote: Sun Jul 07, 2024 4:18 pm Is there a kind of "live consol" wich I can use with c++?
Unless you fork deeply into the source code on github, there is no interaction possible except for the inbuilt tools, which are the web-API: https://www.qlcplus.org/Test_Web_API.html
LukHan wrote: Sun Jul 07, 2024 4:18 pm Maybe someone recommend OLA? It seems like there is an integrated Python API for OLA.
OLA is one thing; OSC is well-supported in Python and has built-in libraries at your disposal. I would keep your neural network separated, simply outputting commands to your light/sound/video QLC+ console. By using input profiles, you quickly will have a running solution.

Keep us posted about your progress.
All electric machines work on smoke... when the smoke escapes... they don't work anymore
LukHan
Posts: 4
Joined: Mon Jun 10, 2024 6:38 pm
Real Name: Lukas Hanisch

Thanks for your contribution.
GGGss wrote: Mon Jul 08, 2024 10:14 am
OLA is one thing; OSC is well-supported in Python and has built-in libraries at your disposal. I would keep your neural network separated, simply outputting commands to your light/sound/video QLC+ console. By using input profiles, you quickly will have a running solution.
So in the Web API I see 14 functions I can use. Most of them are "get" functions. Do I have more options with OSC? My question is where do I have the most options to control and manipulate the functions in QLC+ with python. I am thinking of speed up or slow down functions, BPM adaption and so on. Not only activate or deactivate a button.

Just an overview question before I start to deep dive into that stuff.
GGGss wrote: Mon Jul 08, 2024 10:14 am Unless you fork deeply into the source code on github..
.. and thats the part I would love to skip :D I think my C++ skills are way too basic to understand the QLC+ source code in that way.
LukHan
Posts: 4
Joined: Mon Jun 10, 2024 6:38 pm
Real Name: Lukas Hanisch

mcallegari wrote: Mon Jul 08, 2024 7:07 am [moderator] please read the "community" section description before posting. It's definitely the wrong place to post a support request. Moving to the proper area.
how do I move the request?
janosvitok
Posts: 1325
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

It's already done.
User avatar
GGGss
Posts: 3052
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

LukHan wrote: Thu Jul 11, 2024 6:03 pm
So in the Web API I see 14 functions I can use. Most of them are "get" functions. Do I have more options with OSC? My question is where do I have the most options to control and manipulate the functions in QLC+ with python. I am thinking of speed up or slow down functions, BPM adaption and so on. Not only activate or deactivate a button.

Just an overview question before I start to deep dive into that stuff.
Study the OSC plugin and you will notice that you can address individual channels over multiple universes - if that is what you are after: https://docs.qlcplus.org/v4/plugins/osc
The next decision that needs to be made is whether your application will be responsible for everything. IMHO, the better workload would be to let your neural network do its thing and send out commands where the more powerful functions of QLC+ can be easily addressed. I wonder if you are willing to reinvent an RGB matrix.
Regarding your comment about speed control, the timer widget also accepts external commands, so yes, it can be solved. Actually, almost every control in QLC+ has an external input (or a solution where this can be affected).
All electric machines work on smoke... when the smoke escapes... they don't work anymore
Post Reply