Skip to content
PixDrive

Practice

Why LEDs flicker or step when dimming – and what helps

Max Walter · November 7, 2026

A slow fade into the dark, and suddenly the LED strip drops to black in visible steps. Or the phone video of the installation shows stripes and pumping that nobody saw on site. Or a chase that looks smooth on the computer stutters on the wall.

These are three different problems with four possible causes: how the eye perceives brightness, how fine a color channel can resolve at all, how the LED chips dim, and how the data reaches the controller. Software fixes some of them, only hardware fixes others. This post goes through them one by one and ends with a checklist.

Why dimming without gamma looks wrong

The eye does not perceive brightness linearly. An LED at half power, DMX value 128 of 255, looks much brighter than “half”. In the dark range we notice small changes strongly, in the bright range hardly at all.

Without correction, that has a typical effect: a linear fade from black to white seems very fast at the start and sluggish at the top. The brightness seems to shoot up in the first moments and then barely move.

Gamma correction evens this out. It converts every color value before output, mathematically the value to the power of gamma. With the usual default of 2.2, a fade looks even. PixDrive Studio applies this curve at the very end, when a color becomes the DMX values for the channels. Effects, scripts and the color picker work with the uncurved values before that.

Why fades still step at the bottom: 8 bits

With Art-Net, sACN and the usual pixel chips, each color channel has only 256 levels, from 0 to 255. The gamma curve spreads these levels so the fade looks even. Very few of them are left for the dark range. This is what it looks like at gamma 2.2:

Brightness DMX value
100 % 255
80 % 156
50 % 56
25 % 12
10 % 2
below about 5 % 0 (off)

A slow fade from 10 % to black therefore has exactly three levels: 2, 1 and 0. Each one shows as a jump, the steps in the fade. At the very bottom the LED jumps from “on” to “off”.

This is not caused by gamma but by the 8 bits. Without gamma, the dark range would have more levels, but the whole fade would be uneven. Only a finer resolution would really fix it, such as 16-bit output or temporal dithering. PixDrive has neither built in. How to work around the problem with the right effect, and how a custom script does its own dithering, is described further down.

Double gamma: the most common mistake

Some controllers apply a gamma curve themselves. The Advatek PixLite has a gamma setting per output, and WLED does too, depending on its settings. If the software has already applied gamma, the signal gets curved twice.

You can recognise it by these symptoms:

  • Mid tones are far too dark.
  • Fades look very steep: nothing happens for a long time, then it goes fast.
  • The dark range gets even more stepped than it already is.

The fix is simple: apply gamma in one place only. Either in the software or in the controller, never both. In PixDrive you can choose yourself which side applies the curve.

Gamma per device in PixDrive

In PixDrive Studio, every device has a Gamma correction checkbox in its properties (on by default) and a Gamma field with values from 1.0 to 3.0, default 2.2. Turning it off equals 1.0. Since a device in PixDrive is one controller, you set it to match each controller.

  • The change reaches the live output at once.
  • All exports, FSEQ, Art-Net stream, WLED, TPM2 and SCN, use the same curve as the live output.
  • The setting is saved with the project. Older projects open with 2.2.

When to change the value:

  • The controller has its own gamma: turn it off in PixDrive, or turn off the curve in the controller.
  • Dark transitions look too bright or flat: some LED types look better at 2.5 to 2.8.

For comparison, this is what 50 % brightness becomes: at gamma 1.0 it is DMX 128, at 2.2 it is 56 and at 2.8 only 37.

The LED preview in PixDrive looks the same either way. That is on purpose: the screen applies its own gamma, and a second curve would distort the preview.

Flicker no software can fix: PWM in the LED chips

Pixel LEDs control their brightness with PWM. They switch on and off very quickly, and the ratio of on to off sets the brightness. Cheap or older chips use a low PWM frequency. The eye often sees little of it, but it can flicker, mostly at low brightness. Cameras are more sensitive: on phone and video footage it shows up as rolling stripes or pumping.

No software setting helps here. If your installation will be filmed, for events or social media for example, look for LED chips with a high PWM frequency when you buy them. You will find it in the chip’s datasheet.

An effect is output as single frames, PixDrive uses 60 frames per second by default. Fewer fps mean fewer in-between steps. Slow fades then look more stepped and fast movement stutters.

The network matters too. If Art-Net or sACN packets get lost, the picture stutters. Typical causes are Wi-Fi, broadcast storms and overloaded switches. A cable is the better choice for shows. More about broadcast, multicast and networks is in the post Art-Net or sACN.

The third cause is processing load. An effect script that computes too much per frame drags the frame rate down. If you write your own effects in Lua: compute expensive things once when the script loads, tables for example, and don’t create new tables every frame.

PixDrive prepares effects from your own scripts in the timeline in the background. Even a show with many script segments therefore keeps the output running on loading and after stop and play.

The right effect: practical tips

What helps most against the 8-bit limit is planning effects so they don’t stay in the very dark range for long.

  • Keep dark fades short: long, slow fades below 10 % show only one to three levels. Let the fade end at about 10 to 15 %, or cut to black quickly.
  • Don’t change colors via black: crossfade directly between two bright colors. That leaves more levels for each channel.
  • Build dark moods differently: for calm, dark looks, use white or RGBW channels, or let a few pixels shine brightly instead of running all pixels very dark.
  • Plan the installation brighter: master brightness in PixDrive runs before the gamma curve. 50 % master therefore really looks like half brightness, but it also makes the steps in the dark worse. It is better to plan an installation that does not depend on very low brightness for its effect.
  • Smooth movement with frame rate: for chases or comets, a higher frame rate looks smoother than a longer fade.

A dimmer effect with dithering

A custom effect takes this one step further. The script below is a dimmer built for the dark range. It works around the 8-bit limit with dithering: if a channel should show DMX 1.5, for example, about half of the pixels light at 1 and the other half at 2. Which pixels get which level changes from frame to frame. On average the eye sees the in-between value, and a slow fade below 10 % runs smoothly instead of in three steps.

How the script works:

  • Rebuilt gamma table: when it loads, it works out once which script value gives exactly which DMX value in PixDrive. At gamma 2.2 that is 184 of the 256 DMX levels, the rest can’t be reached at all. So the script knows the two real neighbouring levels for every in-between value.
  • Dithering per pixel, channel and frame: the threshold for “upper or lower level” comes from an evenly spread number sequence. That way there is no visible pattern and no noise.
  • Fine-grained fader: “Travel for 0–30 %” sets how much fader travel the low range gets. At the default of 0.1, the first tenth of the fader covers 0 to 30 % brightness, the rest covers 30 to 100 %.
  • Smoothing: fader movements are followed smoothly, 0.2 seconds by default. Jumpy MIDI faders or coarse automation don’t show.
  • Color: hue and saturation are set separately from the dimmer.

Through control, the parameters are already mapped to a MIDI controller: the dimmer to fader1, the others to knob1 to knob4. How to create your own script is in the guide Custom effects with Lua.

-- @params: [{"id":"dimmer","name":"Dimmer","param_type":{"type":"Float","config":{"default":1.0,"min":0.0,"max":1.0,"step":0.001}},"automatable":true,"control":"fader1"},{"id":"hue","name":"Hue","param_type":{"type":"Float","config":{"default":0.0,"min":0.0,"max":360.0,"step":1.0}},"automatable":true,"control":"knob1"},{"id":"saturation","name":"Saturation","param_type":{"type":"Float","config":{"default":1.0,"min":0.0,"max":1.0,"step":0.01}},"automatable":true,"control":"knob2"},{"id":"fade","name":"Smoothing (s)","param_type":{"type":"Float","config":{"default":0.2,"min":0.0,"max":2.0,"step":0.01}},"automatable":true,"control":"knob3"},{"id":"low_travel","name":"Travel for 0–30 %","param_type":{"type":"Float","config":{"default":0.1,"min":0.02,"max":0.3,"step":0.01}},"automatable":true,"control":"knob4"}]

-- Must match the device's gamma setting
-- (default 2.2; gamma correction off = 1.0)
local GAMMA = 2.2

-- Rebuild of PixDrive's table:
-- in_val[n]   = script value that gives exactly DMX n
-- reach_lo[m] = highest reachable DMX value <= m
-- reach_hi[m] = lowest reachable DMX value >= m
local in_val, reach_lo, reach_hi = {}, {}, {}
do
    local first, last = {}, {}
    for k = 0, 255 do
        local n = math.floor(255.0 * (k / 255.0) ^ GAMMA + 0.5)
        if first[n] == nil then first[n] = k end
        last[n] = k
    end
    for n = 0, 255 do
        if first[n] ~= nil then
            local k = (first[n] + last[n]) // 2
            in_val[n] = min((k + 0.25) / 255.0, 1.0)
        end
    end
    in_val[0] = 0.0
    in_val[255] = 1.0
    local lo = 0
    for m = 0, 255 do
        if in_val[m] ~= nil then lo = m end
        reach_lo[m] = lo
    end
    local hi = 255
    for m = 255, 0, -1 do
        if in_val[m] ~= nil then hi = m end
        reach_hi[m] = hi
    end
end

local level = nil

-- Color at full brightness
local function hsv_to_rgb(h, s)
    local hp = (h % 360.0) / 60.0
    local x = s * (1.0 - abs(hp % 2.0 - 1.0))
    local r, g, b
    if hp < 1 then r, g, b = s, x, 0.0
    elseif hp < 2 then r, g, b = x, s, 0.0
    elseif hp < 3 then r, g, b = 0.0, s, x
    elseif hp < 4 then r, g, b = 0.0, x, s
    elseif hp < 5 then r, g, b = x, 0.0, s
    else r, g, b = s, 0.0, x end
    local m = 1.0 - s
    return r + m, g + m, b + m
end

-- Fader -> brightness: 30 % is reached at "low_travel" fader travel
local function dim_curve(d)
    if d <= 0.0 then return 0.0 end
    local w = clamp(param_low_travel, 0.02, 0.3)
    local p = math.log(0.3) / math.log(w)
    return d ^ p
end

-- Show the wanted DMX value (with decimals) by dithering between
-- the two neighbouring real DMX levels
local function dither_dmx(x, i, ch)
    x = clamp(x, 0.0, 255.0)
    local lo = reach_lo[math.floor(x)]
    local hi = reach_hi[math.ceil(x)]
    if hi == lo then return in_val[lo] end
    local f = (x - lo) / (hi - lo)
    local th = (i * 0.7548776662 + ch * 0.5698402910 + frame * 0.6180339887) % 1.0
    if f > th then return in_val[hi] end
    return in_val[lo]
end

function render()
    local target = clamp(param_dimmer, 0.0, 1.0)

    if level == nil or param_fade <= 0.0 then
        level = target
    else
        local k = 1.0 - math.exp(-delta / param_fade)
        level = level + (target - level) * k
        if abs(target - level) < 0.00001 then level = target end
    end

    local bri = dim_curve(level)
    local r, g, b = hsv_to_rgb(param_hue, clamp(param_saturation, 0.0, 1.0))

    -- wanted DMX value per channel, as PixDrive would compute it
    local dr = 255.0 * (r * bri) ^ GAMMA
    local dg = 255.0 * (g * bri) ^ GAMMA
    local db = 255.0 * (b * bri) ^ GAMMA

    for i = 0, led_count - 1 do
        set_led_rgb(i, dither_dmx(dr, i, 0), dither_dmx(dg, i, 1), dither_dmx(db, i, 2))
    end
end

For the maths to work, the setup has to match the script:

  • Match GAMMA to the device: the value at the top of the script must equal the device’s gamma setting. If you turned gamma correction off, set GAMMA = 1.0.
  • Master brightness at 100 %: master brightness acts before the gamma curve and so shifts the table. Dim with the dimmer in the effect, not with the master.
  • High frame rate: the more frames per second, the calmer the dithering looks. 60 fps is ideal.

Checklist

  1. Apply gamma in one place only, in the software or in the controller.
  2. Start with gamma 2.2 and try 2.5 to 2.8 if needed.
  3. Avoid dark fades, keep them short or run them with the dithering dimmer.
  4. Send Art-Net and sACN over cable instead of Wi-Fi.
  5. Output at 40 to 60 fps.
  6. For flicker on video, check the LED chip and its PWM frequency.

Which controllers work with PixDrive and how to set them up is listed under Compatible hardware.