xLights Brightness Slider value mapping to actual values sent to controller differ - whats the rationale

ornea

New elf
Joined
Jul 29, 2022
Messages
2
Apologies as this is a repeat of my new members say hello question but I think this is the correct place to ask.

Using xLights, with an ESP8266 driving 33 cols x 18 rows (total 594) of WS2811 Addressable BULLET LED Pixels. (6 x 100 pixel strings)

As best as I can tell these RGB nodes(pixels) can have each channel range from 0 - 255.

My questions -

1. Why does the brightness slider in xLights range from 0 - 400 given the above?

2. Why does the following brightness level settings produce the following actual values sent to the controller.?

Request Level -> Level sent
1 -> 2
2 -> 5
3 -> 7
4 -> 10
5 -> 12
6 ->15
...
10 -> 25
...
20 -> 51
...
100 - > 255 (this kinda makes sense as 100% = max brightness, but then why does the slider go to 400)

101 - 400 -> 255 Any setting above 100 produces no change. i.e. they all map to 255

I have somewhat successfully implemented a work around but curious if anyone is aware of the rationale. Do some lights use values from 0 - 400, or do some controllers accept values from 0 - 400. It is most curious.

It is also has the effect of loss of fine granular control at the bottom end where are eyes are most sensitive.

Any insights, warmly welcome.

Cheerful regards
Ornea
 

merryoncherry

Senior elf
Joined
Apr 2, 2022
Messages
645
Location
Cherry St., Hudson MA USA
A lot of thoughts here, maybe I can hit the answer to your question...

The xLights brightness slider I can think of scales the brightness of an effect, which has its own range 0-255, to a new range 0-255. So, if your original effect was too dim, you could use a setting over 100%. (Try it with a gray or grey "On" effect to see for yourself, if you crank it down it gets darker gray and if up it goes toward white.) This is more useful with something like an image, which has a lot of color range in it, and can't be controlled by color choices directly.

As for the granularity, if you set brightness to 1, you're saying it outputs 2, but I'm guessing that is when the original effect is at 255. There'd be some original range that produces 0 and 1 also. Yes, the result is going to be low fidelity to the original colors. 8 bit has somewhat limited dynamic range.

I think it is not necessary, but while you can't slide the slider to fractional values, you could put 1.5 in the text.

You mention the sensitivity at the bottom end, you should read about "gamma". If you haven't read about it yet, you'll find that the situation is even worse than you think. The "1" value is often pretty bright, and only 7 colors can be that dim, for more variety you have to use values much bigger than 1 that quickly become a few times brighter.
 
This thread is very old. An answer might not be needed anymore.
Top