Re-patching a universe while on BLACKOUT outputs data

Generic issues not specifically related to a QLC+ area.
Post here only if you can't really find the reason of an issue
Post Reply
User avatar
kripton
Posts: 42
Joined: Tue Sep 29, 2015 7:01 pm
Real Name: Jannis

Hi Massimo, sorry if this is known or already reported somewhere. It's late and I should go to bed, I just want to share this.
I have 16 universes, all ArtNet outputs and 16 running functions (all RGB Matrix, all running on the "Virtual Console", one per universe). Then, I click the BLACKOUT button in the top right and all lights go off. However, when I then un-patch and re-patch a universe, the lights in that universe are not off. I'd say this is a bug?

Gentoo Linux, QLC+ 4.12.4
User avatar
GGGss
Posts: 2745
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

How do you unpatch a universe?
I merely assume that by pressing the blackout button, running functions will go dark. Now if you add a universe, the blackout function does not know about that new universe. Functions running before you pressed blackout will still be there.
Right?
All electric machines work on smoke... when the smoke escapes... they don't work anymore
User avatar
kripton
Posts: 42
Joined: Tue Sep 29, 2015 7:01 pm
Real Name: Jannis

In the "Inputs/Outputs" tab, select the universe on the left, then untick the checkbox on the right half.
I assumed that the "blackout" is part of the "engine" and it should always output allZero to all universes, no matter if/which functions are running and how the universes are actually patched. Might be wrong, didn't yet look at the source code.
User avatar
GGGss
Posts: 2745
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

If I'd code a blackout function, I'd enumerate all universes in use and force 0 values to all channels. The problem here is an enumeration and forcing values. After the user clicks the blackout button again, he/she would expect functions, running before, to be active again?
All electric machines work on smoke... when the smoke escapes... they don't work anymore
User avatar
kripton
Posts: 42
Joined: Tue Sep 29, 2015 7:01 pm
Real Name: Jannis

Well, not quite. Yes, you could also say you enforce the value 0 on the universes. But that actual patching should be independent of that. So it should not matter if a universe is patched or not, as long as BLACKOUT is active, it should have the 0s for all channels. So if I unpatch a universe, the functions should of course continue to run. But when I re-patch that universe to an output while BLACKOUT is still active, the forcing of the values needs to go on and not output values != 0
janosvitok
Posts: 1281
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

Jannis,

good catch. The problem is that when a patch is created, the blackout state is not propagated. It is only when the user changes it. It might be worth checking if there are other properties that should be
propagated.
Here I propose 2 fixes. I don't have qlc+ dev environment right now so I didn't test the code.

Solution #1 (not tested):
https://github.com/mcallegari/qlcplus/b ... p.cpp#L510

replace
if (isFeedback == false)
return m_universeArray.at(universe)->setOutputPatch(plugin, output, index);
else
return m_universeArray.at(universe)->setFeedbackPatch(plugin, output);
with
Universe* u = m_universeArray.at(universe);
if (isFeedback)
return u->setFeedbackPatch(plugin, output);

if (!u->setOutputPatch(plugin, output, index))
return false;
if (m_blackout)
u->outputPatch(index)->setBlackout(blackout);

Note 1: line 515 return false; can be removed; it will never be executed
Note 2: https://github.com/mcallegari/qlcplus/b ... e.cpp#L639 if index != m_outputPatchList.size() then the code will not work (since the patch index will not match the requested/expected index).

Solution #2 (not tested):
https://github.com/mcallegari/qlcplus/b ... p.cpp#L510

replace
if (isFeedback == false)
return m_universeArray.at(universe)->setOutputPatch(plugin, output, index);
else
return m_universeArray.at(universe)->setFeedbackPatch(plugin, output);
with
Universe* u = m_universeArray.at(universe);
if (isFeedback)
return u->setFeedbackPatch(plugin, output);

return u->setOutputPatch(plugin, output, index, m_blackout))

and add parameter bool initialBlackout to Universe::setOuputPatch()
i.e. after https://github.com/mcallegari/qlcplus/b ... e.cpp#L630 and https://github.com/mcallegari/qlcplus/b ... e.cpp#L641 call patch->setBlackout(blackout)
(maybe after emit; I'm not sure)

Jano
User avatar
GGGss
Posts: 2745
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

First:
I never ever use blackout, simply because all my external gear (BCF, nanopad, ...) will stop working also.
kripton wrote: Fri Oct 15, 2021 6:07 pm Well, not quite. Yes, you could also say you enforce the value 0 on the universes. But that actual patching should be independent of that. So it should not matter if a universe is patched or not, as long as BLACKOUT is active, it should have the 0s for all channels.
Clear.
But you know that QLC+ has to be stopped and started again in production mode before the newly patched universe will do something?
kripton wrote: Fri Oct 15, 2021 6:07 pm So if I unpatch a universe, the functions should of course continue to run.
To my recollection, if you unpatch a universe; you are pulling the wire loose... I don't see a reason why you should do so. Unless the fixtures have a 'HOLD' or 'KEEP' setting inside their firmware, lights will go out when you pull the wire loose.
kripton wrote: Fri Oct 15, 2021 6:07 pm But when I re-patch that universe to an output while BLACKOUT is still active, the forcing of the values needs to go on and not output values != 0
QLC+ will have to be stopped and started again for this to be true.
All electric machines work on smoke... when the smoke escapes... they don't work anymore
janosvitok
Posts: 1281
Joined: Mon Apr 13, 2015 7:05 am
Location: Bratislava, Slovakia
Real Name: Jano Svitok
Contact:

GGGss wrote: Sat Oct 16, 2021 8:27 am First:
I never ever use blackout, simply because all my external gear (BCF, nanopad, ...) will stop working also.
I'm not sure and don't have time to check the sources now. Nevertheless, BLACKOUT should not affect feedback outputs neither inputs.
I suppose your BCF/nanopad are patched as input+feedback. If the BLACKOUT indeed affects any of input/feedback it is a bug and should be fixed.

Jano
User avatar
kripton
Posts: 42
Joined: Tue Sep 29, 2015 7:01 pm
Real Name: Jannis

Thanks janosvitok for the two patch possibilities. I'll test them the following days, probably more like Friday. The first solution seems to be less intrusive so I'll focus on that first.

GGGss: I also use blackout very seldom. I'm just currently developing a 16-universe USB-to-DMX-interface and there the blackout function in combination with a lot universe re-patching is quite a handy tool. I agree that re-patching doesn't usually happen "during a show", but it's still a bug that's confusing.

What actually happened was that I turned on blackout and forgot about it (one idea would be to add "BLACKOUT" to the title bar?). Then I tried to find out, why my fixtures didn't react when I pulled a slider in the Simple Desk. I then re-patched my universes (ArtNet to USB and back) and the fixtures started to light up. After I while I saw the active "BO" button and was really surprised to see my fixtures not being black ;)
User avatar
GGGss
Posts: 2745
Joined: Mon Sep 12, 2016 7:15 pm
Location: Belgium
Real Name: Fredje Gallon

too funny ... once had an intervention (SOS-call) to a desk... The guy was struggling ... for 45 mins, he could not run a show at all. I brought a spare desk, overthinking every possible cause. DMX ok, running program ok, firmware, ... network, everything. Decided to start exporting things and setting up the spare desk. The switchover was planned between gigs albeit not necessary BC there was no light show running (only statics). We didn't risk losing the lights that were lit.
After import to the spare desk, I checked a specific setting inside a user profile on the desk running, and wanted to migrate that profile.
All of a sudden it struck me: the guy was running his show in preview mode... :ugeek: :cry: 3D and network showed output, DMX bus was active but frozen...
All electric machines work on smoke... when the smoke escapes... they don't work anymore
Post Reply