Page 1 of 1

Script: startfunction

Posted: Tue Jun 09, 2020 5:47 pm
by Alhifi
Hi experts,

actually I have the following "setup":

- some moving heads
- separately different chasers for color and movements, so I can do more effects with only a few chasers
- - example
- - - chasers for blue, red or green light effects within a solo frame
- - - chasers for left-right, up-down and up-down-left movements within a solo frame

now I have some new chasers with special combined scenes/collections with light AND movement commands. If I now want to start one of them, I had to stop the possible running others chasers for lights and movements. I cannot place new buttons in one of the solo frame because in the other is also another one running. The best way I think I can realize that are different scripts like the one below:

Code: Select all

stopfunction:1414 // stop Movement-Chaser 01 if this is running
stopfunction:1415 // stop Movement-Chaser 02 if this is running
stopfunction:1416 // stop Movement-Chaser 03 if this is running
stopfunction:1433 // stop Light-Chaser 01 if this is running
stopfunction:1434 // stop Light-Chaser 02 if this is running
stopfunction:1435 // stop Light-Chaser 03 if this is running
stopfunction:1502 // stop Combined-Chase 02 if this is running
stopfunction:1503 // stop Combined-Chase 03 if this is running
startfunction:1501 // start Combined-Chaser 01
The stopfunction works, all listed chasers are switched off, but the startfunction does not really work, nothing really happens.
During the search for the error I have placed a cue list with the "Combinec-Chaser 01" on the virtual console to see what happens. If I push the button to start the script I see something happening at this cue list, but the function/chaser did not start and runs alone. Whats wrong here, any hints?

Bye
Alhifi

Re: Script: startfunction

Posted: Mon Jun 15, 2020 6:55 pm
by Alhifi
No one an idea?

Re: Script: startfunction

Posted: Tue Jun 16, 2020 8:44 am
by GGGss
Why don't you combine selected chasers in a collection? https://www.qlcplus.org/docs/html_en_EN ... ditor.html

Doing so will start all wanted functions (chasers) and resets the state in the solo-frames.
(so resetting everything will be unneeded.)

Re: Script: startfunction

Posted: Tue Jun 16, 2020 9:10 am
by Alhifi
Hi GGGss,

I do not really understand, what you mean.

I have chasers where I have ONLY movements commands ...
I have chasers where I have ONLY colors commands ...
Both are separated in two solo frames, one for color, one for movements, so I'm very flexible to generate effects. I could combine them in collections, but then I have a lot more of collections and also buttons like before!
Example: 6 separate chasers for colors, 6 separate chasers for movement = 12 buttons, 36 possible different effects.
If I use your advice, it would generate 36 buttons to get the same like before.

Now I have additional chasers where I have combined movement and color commands for special effects. If I start one of them I need to stop the other ones which are possible running in the solo frames for movement and color. I can use a script, which works, I simply stop all possible color and movement chasers, until here it works.
If I now want to start one of the combined chasers, it did not work. If I place (for testing) a cue list with this chaser on the desktop, I can see that shortly something happens there, but the chaser did not continue run.

The simple question is: how can I get a chaser running started by a script and the startfunction-command?

Bye
Alhifi

Re: Script: startfunction

Posted: Wed Jun 17, 2020 8:36 am
by GGGss
aha ... now I understand. I thought you wanted to start a color, a movement, and a ... -> use a collection tho start that.

Are the chasers you use the same of those in the solo frames?
Then you will have to copy them to new ones. This is because if you start something outside a solo frame (and what you start is also inside a solo frame) the solo frame event will override / conflict.
That is why you see something flicker and stop.

Try to copy the combined chaser and try to start that chaser outside the solo frame. Now, this should work.

Re: Script: startfunction

Posted: Wed Jun 17, 2020 7:49 pm
by Alhifi
Hi GGGss,

thank you again for your response, but it did not work, sorry.

To show my setup I did another screenshot to explain, please take a look:

Image

As you can see I use a normal frame with pages on the virtual console. On the page for the "spider" I have 3 solo frames, which are marked here with rectangles in different colors. The first two are the solo frames for color- and moves, the one below is the one for the combined chasers. Actually I think the third solo frame is not really necessary, because all buttons start a script which stops all functions from the both above and also possible running other scripts. So I have tested to place the button for the script outside the third solo frame, but within the big normal frame, did not work. I also placed the button directly on the virtual console, outside the normal frame, same here, did not work.

As you can see there is also a dark grey button near the cue lists, which starts a script which only contains a "startfunction" for a chaser which is not used anywhere else, it's still the same, I see the short "flicker" and then it stops. What's wrong here ???

Bye
Alhifi

Re: Script: startfunction

Posted: Thu Jun 18, 2020 8:21 am
by GGGss
To start debugging I would hugely simplify your environment.
Try to make a new project only having the basics to test.

I'm guessing since you are seeing a flicker, that a function starts and immediately is killed again.
Who is killing what is the puzzle you have to solve.

As before I bet my money on functions started outside a solo frame, which kills a function inside a solo frame and therefore kills the function outside of the frame.
The flicker is typically 20ms long ... the running frequency of QLC+. The time QLC+ needs to start a function and to kill it again after 20ms.

Re: Script: startfunction

Posted: Thu Jun 18, 2020 9:43 am
by Alhifi
Ok, I will try that again in the evening today.

But when I understand your answer correctly, the only way to get this setup really working is, if I do it without any solo frame!

I will delete the solo frames, put the whole buttons directly on the page of the normal frame and create scripts for them, which means if I push one a script will stop all other running color OR move-functions depending on what I want to change and start a new one. I also use the combined ones, but here I stop all running color AND move-functions. As you mean this should work.

As I wrote yesterday there is no function running when I start QLC+. I cannot really explain why the button directly on the virtual console is not working when I start a script over it, so I cannot really believe that the solution here will work.

Bye
Alhifi

Re: Script: startfunction

Posted: Fri Jun 19, 2020 9:51 pm
by Alhifi
Now I have tested the following:

Complete new project with only 4 spots.
3 different scenes with all 4 spots (R/G/B).
Put this 3 scenes into a chaser.
Create a script with one startfunction command, using the ID of the chaser.
I place a button on the virtual desktop to start the script.
I place a cue-list with the chaser on the virtual console to see if it will run or not.

If I now push the button still the same happens, I see a flicker in the cue list, but the chaser did not run continuously.

How can I start the chaser with the startfunction-command???

Bye
Alhifi

Re: Script: startfunction

Posted: Sat Jun 20, 2020 11:10 am
by mlohrey
HI Alhifi,

Scripts in QLC+ only remain active while they are running. Don't ask me why but I am sure there is a good reason.

Anyway, if you want the chaser to remain active just add a wait command in your script for as long as you want it to run. A large number will mean it will run continuously. If you want to end the function before the time you set, then click the button to stop the script or add a 'stop all functions' button.

Cheers

Mark

Re: Script: startfunction

Posted: Sat Jun 20, 2020 9:02 pm
by Alhifi
Hi Mark,

ok, this works, thank you!

I'll add a 24h wait command and now the chaser runs as I want ... but is that not a little bit stupid, I'll start a function like a chaser with the startfunction-command and it runs only when the script is running too?

Ok, I can live with that!

Bye
Alhifi