Random Chase Order?

Archive of the non-categorized posts related to the QLC+ technical support.
Please do not create new threads here, instead, use the categories above !
Post Reply
Joe

Hi all,

Another feature request... Would it be possible to have "Random" added to the chaser as a direction? For scanners I generally make a bunch of positions then try and randomly scatter them in really long chases to keep the movement fresh, and having QLC+ randomly play back the positions would save much much time.

Thanks!
Jano Svitok

Can you propose some definition for "random order"?

Let's say we have a deck (chaser) of 10 cards (steps), and you have to show a random card every one minute. How would you go about that? Would you (1) pick some card, show it and stick it back to deck? Or (2) shuffle the deck and then show the cards one by one, and when it's done, shuffle it again? Or some other way?

Note that (1) seems more random, but one card can appear several times in a row (this case can be handled as a special case), while in (2) the frequency of each card is more or less equal. What's more preferable? What properties should the random order have?

If you propose a way, I'll implement it (unless I'm really busy with other things).

--

I was thinking also of making random EFX path, but it requires similar thought... so that
e.g. the movement respects speed, is not too random, etc. I'm afraid "pick any position every x milliseconds" won't work (and neither will the motors/joints :) )
Massimo Callegari

Hi, about this, I guess the most expected behaviour is that on 10 steps, they have to be reproduced randomly (with their own timings) with no repetitions until you reach 10. Then the random order is shuffled and played back again.

This is what happens on RGB matrix random effects at least.
Paul Evans

Effectively you want it to cycle through the cue deck, but every time it gets to the end and restarts it, it will shuffle the deck into a random order first, then play through each of them in that order. This would ensure fairness
Robert Scheffler

I am in favor of a "shuffle" as well. How ever many steps are in the chaser, shuffle them.

A special case (if you want to get fancy) is when you hit the end of the 'deck' and then shuffle, there is still a chance you repeat the last one as the first in the next 'shuffle' (but never repeats more than twice).

This happens in our audio players, we have changed all "random" to "shuffle" as people expect a 'shuffle' even when they ask for 'random'.

Bob
Joe

The shuffle style thing sounds fine to me. Also Jano, a Random EFX path would be great too. Only question is would you have it draw a path (better for moving heads) or just have random points (better for snap movements on Scanners).
Jano Svitok

Random chase order is in git :)
Massimo Callegari

Ouch ! Right after I've done this so long awaited Chaser tutorial :(

Well done anyway :)
Wazzledi
Posts: 21
Joined: Thu Aug 10, 2023 1:37 pm
Real Name: Dennis Suermann

Hey,

just a quick question: Is it intended that a random order chase connected to a button in the virtual console always starts with the first function in the chase?
As I understood it right, the order gets shuffled before playing the chase.

I am currently searching in the code if i can find the place where this is implemented.

I assume the "computeNextStep" in the ChaserRunner class is the function that is called when starting and stepping a chaser, right?
Can someone give me a hint where the start of a chaser from a virtual console is implemented?
Otherwise, i have to search the code.

Best regards,
Dennis
Last edited by Wazzledi on Thu Aug 10, 2023 1:52 pm, edited 1 time in total.
Wazzledi
Posts: 21
Joined: Thu Aug 10, 2023 1:37 pm
Real Name: Dennis Suermann

I actually found the line in the code that causes this "issue".

In "chaserrunner.cpp" in the write method when we execute the ChaserSetStepIndex action, which is attached and called by "vcbutton.cpp" in the pressFunction method, the index of the chase always gets set to 0.

The randomStepIndex method gets never used for this action.
Therefore, i changed the code to this:

Code: Select all

if(m_chaser->runOrder() == Function::Random)
{
	m_lastRunStepIdx = randomStepIndex(m_pendingAction.m_stepIndex);
}
else
{
	m_lastRunStepIdx = m_pendingAction.m_stepIndex;
}
The if statement is not necessarily needed here because the randomStepIndex method already checks the necessary condition.

Now the chase always starts with another chase function instead of always using the first one.
If that is intended behavior, i can submit a pull request, otherwise, i just use it for myself.
User avatar
mcallegari
Posts: 4482
Joined: Sun Apr 12, 2015 9:09 am
Location: Italy
Real Name: Massimo Callegari
Contact:

Hi, please send a Pull Request and I'll check it when I have some time. Thanks
Post Reply