Skip to content

BlurzEffect

Source: BlurzEffect.h

BlurzEffect

class BlurzEffect
src/light/effects/BlurzEffect.h:27

Inherits: EffectBase

Audio-reactive effect: blurred dots positioned by frequency band.

BlurzEffect card BlurzEffect controls Author: Andrew Tuline (WLED-SR), with enhancements by @softhack007, via the predecessor, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Effects/E_WLED.h

Each frame lights one dot colored by a band's magnitude, then blurs the whole strip. The dot bleeds into a soft smear that drifts and fades. A band cursor advances each frame, so the color cycles through the spectrum over sixteen.

Prior art: WLED's Blurz, by way of MoonLight.

Public Attributes

uint8_t fadeRate = 48 : How fast the trail fades each frame.

uint8_t blur = 127 : How far the blur spreads each dot into its halo.

bool freqMap = false : Position the dot by the dominant frequency rather than scanning or jumping.

bool geqScanner = false : Sweep the dot steadily rather than jumping it, when freqMap is off.

Public Methods

virtual inline const char * tags() const override : Catalog tags: WLED lineage, audio-reactive.

virtual inline Dim dimensions() const override : A flat run of pixels, spanning a panel as readily as a strip.

virtual inline void defineControls() override : Publish the trail, the blur and the two positioning modes.

virtual inline void prepare() override : Arm the one-shot clear and rest both cursors, so a rebuild starts from a known state.

virtual inline void tick() override : Fade the trail, place this frame's dot, blur the strip, then re-stamp the dot's core.

More info

Where the dot lands is the lever

With freqMap its position tracks the dominant frequency, so the spectrum scrolls with pitch. With geqScanner it sweeps steadily across the strip instead. With neither it jumps to a random position each frame, which is the classic look.

The effect is a strip in spirit, declared 2D so it spans a panel as a flat run of pixels. The dot and the blur work over the whole pixel count either way.