Hi All,
I am something of a programmer, and so was experimenting with the Scripts feature of QLC+. I have 2 moving heads, and I would like to create a Script to allow them to function together as a single spotlight, controlled by a single XY Pad. I had hoped to do the math for this externally using SystemCommand, but it seems that command does not return values to the QLC+ script. Is there a better way to accomplish this?
For clarification's sake, the behavior I am hoping for is such that if I want my spotlight in-between the two moving heads, one would be panned to the left and the other to the right so that they meet in the correct location on stage. If I wanted the spotlight off to one side or the other, then both heads would pan in the same direction, but to varying degrees. I hope that makes sense.
Thanks for any advice!
Mike
Synchronized Spotlight movement in Script
-
- Posts: 1325
- Joined: Mon Apr 13, 2015 7:05 am
- Location: Bratislava, Slovakia
- Real Name: Jano Svitok
- Contact:
Just some ideas:
scripting languages (python/ruby/php/...): create simple artnet node that will receive direct output from xypad (4 channels) and produce external input for faders controlling pan/tilt of the heads (channels: 4xnumber of heads)
most probably you'll need to use different address than QLC+ uses (127.0.0.x, x > 1 might be useful). Also choose the universe so that it doesn't clash with QLC+ and any other artnet you may have.
Artnet is really simple protocol and there are libraries for it.
c++: create plugin to do the same inside QLC+. base it on loopback plugin, with the difference that you won't be copying the data 1:1, rather computing new values.
you'll need to hardcode most of the parameters, or you may use QSettings class to read them from config file
proper way would be to create new widget similar to xypad, and include all settings and computation there.
xypad contains some computation how to convert PAN/TILT DMX values to angles and so does 2D monitor. Those are based on PAN/TILT range from fixture definition. The conversion is 0 -> -pan range/2; 127 -> 0; 255->pan range/2
The same for tilt. Unfortunately this does not work for all heads (it also depends on what you call angle 0 degrees - the idea is that it should be front of the light).
In addition to the above you'll need (most probably): real size of the area covered by XYPAD, position and orientation of the heads relative to the area (i.e. from the center of the area).
You may want to also consider that the same angle may be achieved by several DMX combinations (e.g. PAN +/-180, TILT +/-180 or PAN +/- 360).
How complicated this will be depends on how many parameters are you able to fix (e.g. heads always mounted pointing down, facing stage; always same height/position, etc.).
If you need to help with any of the above ways, just ask.
scripting languages (python/ruby/php/...): create simple artnet node that will receive direct output from xypad (4 channels) and produce external input for faders controlling pan/tilt of the heads (channels: 4xnumber of heads)
most probably you'll need to use different address than QLC+ uses (127.0.0.x, x > 1 might be useful). Also choose the universe so that it doesn't clash with QLC+ and any other artnet you may have.
Artnet is really simple protocol and there are libraries for it.
c++: create plugin to do the same inside QLC+. base it on loopback plugin, with the difference that you won't be copying the data 1:1, rather computing new values.
you'll need to hardcode most of the parameters, or you may use QSettings class to read them from config file
proper way would be to create new widget similar to xypad, and include all settings and computation there.
xypad contains some computation how to convert PAN/TILT DMX values to angles and so does 2D monitor. Those are based on PAN/TILT range from fixture definition. The conversion is 0 -> -pan range/2; 127 -> 0; 255->pan range/2
The same for tilt. Unfortunately this does not work for all heads (it also depends on what you call angle 0 degrees - the idea is that it should be front of the light).
In addition to the above you'll need (most probably): real size of the area covered by XYPAD, position and orientation of the heads relative to the area (i.e. from the center of the area).
You may want to also consider that the same angle may be achieved by several DMX combinations (e.g. PAN +/-180, TILT +/-180 or PAN +/- 360).
How complicated this will be depends on how many parameters are you able to fix (e.g. heads always mounted pointing down, facing stage; always same height/position, etc.).
If you need to help with any of the above ways, just ask.