RGB Panel and Scripting Language

Ask a question about the usage of QLC+ with the Windows operating system
Post Reply
varselemu
Posts: 4
Joined: Fri Jul 14, 2017 5:20 pm
Real Name:

RGB Panel and Scripting Language

Post by varselemu » Fri Jul 14, 2017 9:06 pm

At work I'm using QLC+ on a Windows Surface Pro to control an RGB panel with 8 high-power lasers. My goal is to create a series of flashy demos for customers to show off some light fiber product we have.

Since the demos I'm going to make will be fairly complicated, rather than use the slow point and click interface of the GUI I want to use the script editor to generate the desired lighting patterns in a timely and efficient manner. At the heart of these demos will be fading the RGB lasers in and out to provide a better viewing experience for the customers being shown the demos.

The structure for the code that I've come up with to fade the lasers in looks something like this:

setfixture val:startVal
wait:deltaT
setfixture val:startVal+incVal
wait:deltaT
setfixture val:startVal+2*incVal
wait:deltaT
.
.
.

and so on and so forth so that whoever is watching gets the effect of the laser gradually lighting up for a period of time that would be tunable in the script through changing the value of deltaT and over a range of brightnesses that would be tunable through changing the values of startVal and incVal.

How do I iterate this in the Script Editor so that I don't have to hard-code the entire thing and then go back and change the value of every single instance of "wait:value" and "setfixture:value" if I get them wrong initially or they need to be tuned at a later point? I've tried writing a for-loop and found the editor does not recognize it. I can't find any information on the way the script editor works besides the aforementioned "keyword:value" syntax so I'm hoping someone here can point me in the right direction.

janosvitok
Posts: 828
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Re: RGB Panel and Scripting Language

Post by janosvitok » Fri Jul 14, 2017 9:33 pm

1. the script language is pretty simple. There's nothing more than described in http://www.qlcplus.org/docs/scripteditor.html
that means in your case it's missing variables, for, + and *.

2. would your script do anything different than fading values from A to B over time T? E.g. if you create two scenes A and B, and crossfade them with fade time T,
would it look different (e.g. are the "steps" in your script intentional?)

3. Have you looked at RGB Scripts? If you need to control this way RGB channels only, you may want to create RGB Matrix out of the lasers, and you can write scripts in javascript.

varselemu
Posts: 4
Joined: Fri Jul 14, 2017 5:20 pm
Real Name:

Re: RGB Panel and Scripting Language

Post by varselemu » Mon Jul 17, 2017 7:56 pm

1. Thanks for letting me know

2. No, my script would not do anything more than fade from A to B over a time T. Is crossfade something that can be easily integrated into a script?

3. I have not looked at RGB scripts, I will make sure to do that.

Q: how do outside scripting languages and QLC's interface with each other? I have no experience with javascript so e.g, what would I be writing in it if I wanted to control the 8 channel and how would I run it? Would I use the systemcommand keyword?

janosvitok
Posts: 828
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Re: RGB Panel and Scripting Language

Post by janosvitok » Mon Jul 17, 2017 8:44 pm

Let's make this clear first: RGB Scripts and Scripts are two different things.

Scripts: use limited language (see above) and may control many aspects of QLC+
RGB scripts: are written in javascript (JS interpreter is built in QLC+) and create RGB map that is applied to RGB matrix.
In other words they produce rectangular matrix of R/G/B values.
They can have properties set from GUI/user and they tell QLC+ how many steps they produce for a given matrix.

The values produced by RGB script are additionally faded directly by QLC+.

If you only need to control RGB channels, create Fixture Group (http://www.qlcplus.org/docs/fixturemanager.html), then create RGB Matrix (http://www.qlcplus.org/docs/rgbmatrixeditor.html),
assign your fixture group to it, and assign your JS as well.


Another way for you may be to use scenes, but create them programmatically. QXW file is an XML file, so it is not too hard to create the scenes, add them to a chaser, and set timing.


I (or other) may be able to help you better if you can post here what you have created so far (qxw file, and most importantly, qxf file for your lasers).

varselemu
Posts: 4
Joined: Fri Jul 14, 2017 5:20 pm
Real Name:

Re: RGB Panel and Scripting Language

Post by varselemu » Mon Jul 17, 2017 10:56 pm

This is my .qxw file that I'm working with. It's not complete but looking at the RGBWShift chaser should give you a sense of what Im trying to accomplish. I've summarized its function below

I have 4 lasers on the RGB panel that I am using: channels 1, 2, 4, 6. Each of these channels is connected to some of our product that is physically configured in the following manner:
6 | 2 | 4 | 1

RGBWShift loops the following pattern

W | B | G | R
B | G | R | W
G | R | W | B
R | W | B | G

I have the colors set to fade high for 1s and fade low for 1s, the 1s transition is to make sure no transient color-mixing happens.

Looking at the documentation on RGB scripts I have two major questions right now:
1) How do I create the fade effect?
Is it correct to assume I'll just need to create a certain number of maps that gradually increase from intensity A to intensity B?
2) How do I individually select the color of each of my fixture heads? The link to QRgb makes no sense to me.
Attachments
8channel_Demos.qxw
(16 KiB) Downloaded 7 times

janosvitok
Posts: 828
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Re: RGB Panel and Scripting Language

Post by janosvitok » Mon Jul 17, 2017 11:36 pm

1) just set fade times in rgb matrix editor (fade in 1s, fade out 1s, hold 2s)
2) see https://github.com/mcallegari/qlcplus/b ... radient.js or https://github.com/mcallegari/qlcplus/b ... /plasma.js

varselemu
Posts: 4
Joined: Fri Jul 14, 2017 5:20 pm
Real Name:

Re: RGB Panel and Scripting Language

Post by varselemu » Tue Jul 18, 2017 6:04 pm

Thanks for all the help, I think I've got a hold of what to do. One last problem I'm experiencing, which the images of my filesystem and the GUI I've attached should corroborate, is that the scripts I'm writing are not showing up as an option in QLC+. I've tried saving them in the user and the system directory and even both to no avail. They simply will not show up. Do you know why this might be?
Attachments
UserRGB.png
SystemRGB.png
MissingScripts.png

OddSocks
Posts: 109
Joined: Tue Apr 14, 2015 11:33 am
Real Name: Tim Cullingworth

Re: RGB Panel and Scripting Language

Post by OddSocks » Tue Jul 18, 2017 6:23 pm

Have you set algo.name to your new script name?

Post Reply