Page 1 of 1

Sharing: 6 Channel Modifiers Templates

Posted: Tue Aug 05, 2014 9:54 pm
by Luis García-Tornel
I'd like to share 6 Channel Modifiers Templates:

+ Logarithmic Shallow
+ Logarithmic Mid
+ Logarithmic Deep
+ Exponential Shallow
+ Exponential Mid
+ Exponential Deep

Some notes about the templates:

The templates have a value for **each** Original DMX Value, so are a bit "overcrowded"in the Channel Modifier Editor.

For the same reason, I don't know if there are any performance issues. I've tested them and not seem to have any problems, but if you experience any I'd gladly edit them.

Also the names are "inverted" respect the Default "Logarithmic" template. (i.e. the exponential corresponds to logarithmic and vice-versa).

LUIS

Sharing: 6 Channel Modifiers Templates

Posted: Tue Aug 05, 2014 9:59 pm
by Luis García-Tornel
The files.

Sharing: 6 Channel Modifiers Templates

Posted: Wed Aug 06, 2014 8:55 am
by Massimo Callegari
Hi Luis, thank you very much for this !
I will check them later.

As for CPU usage, there is no side effect. When a modifier is loaded, it is converted to an array of 512 bytes anyway, no matter if it is composed by 2, 10 or 100 handles.
Having 512 handles might only slow down the QLC+ startup time but I think on a modern PC we shouldn't see any difference.
I need to check them on the Raspberry Pi, where all the CPU load is amplified...

Sharing: 6 Channel Modifiers Templates

Posted: Wed Aug 13, 2014 12:10 pm
by Massimo Callegari
Hi Luis, I finally found the time to review this.
First I correct my previous post. They are converted into a 256 bytes array, not 512.

I've seen that a little optimization can be done on your templates.
For example this:





Can be optimized into this:



Also this:


















Can become this:



Manually it's a very patient job to do, but maybe some magic script can help ?

It would help to make the templates lighter, thus speeding up QLC+ startup time.
Always keep in mind that on a PC you don't see any difference, but on a Raspberry Pi you do.

Sharing: 6 Channel Modifiers Templates

Posted: Wed Aug 13, 2014 2:46 pm
by Jano Svitok
I will try to come up with a script for cleaning.

Slightly off-topic: in the editor, it is possible to create points with non-increasing x coordinates. I believe that is a bug.

Also "threshold" preset has two entries for 128 (one with 0 and one with 255 value). I didn't check the code, but I suppose it's not OK.

Sharing: 6 Channel Modifiers Templates

Posted: Wed Aug 13, 2014 2:58 pm
by Massimo Callegari
Jano, I was counting on your magic scripts :)
Handles with same x position are OK as they are the only way to have a step on a DMX value. If you look at the code that generates the final 256 bytes array (the one used by the Universe class) you'll see they're merged into the higher value.
I spent quite a hard time on that, so I'm pretty sure they are a wanted feature :)

Sharing: 6 Channel Modifiers Templates

Posted: Thu Aug 14, 2014 7:28 pm
by Luis García-Tornel
If the script is proving difficult I may clean them manually. Just wait me until next week ;)

Sharing: 6 Channel Modifiers Templates

Posted: Fri Aug 15, 2014 6:00 am
by Luis García-Tornel
I've found a better way to do it. Technically it's not logarithmic/exponential but a bézier curve.

I'm attaching a spreadsheet demonstrating it. I tried to make it as clearer as possible.

Sharing: 6 Channel Modifiers Templates

Posted: Fri Aug 15, 2014 9:33 am
by Massimo Callegari
Very nice Luis !
If the precision is enough for your purposes, then I believe I'd prefer this way. It look lighter and cleaner to me.
Whenever you have some time to review your modifiers, please feel free to submit the smaller versions.
Thanks !

Sharing: 6 Channel Modifiers Templates

Posted: Wed Aug 20, 2014 1:48 am
by Luis García-Tornel
Finally! here are the smaller versions of the modifiers.

Sharing: 6 Channel Modifiers Templates

Posted: Wed Aug 20, 2014 2:07 am
by Massimo Callegari
Thanks Luis !
Would you mind to send a pull request for this on GitHub ?
I've pushed them a few days ago, with different names

Sharing: 6 Channel Modifiers Templates

Posted: Wed Aug 20, 2014 2:24 am
by Luis García-Tornel
I'm not at my machine right now. I'll do the pull request as soon as possible.

Sharing: 6 Channel Modifiers Templates

Posted: Wed Aug 20, 2014 4:49 am
by Luis García-Tornel
Done! it's on GitHub