NoiseMeterEffect
Source:
NoiseMeterEffect.h
NoiseMeterEffect¶
src/light/effects/NoiseMeterEffect.h:23Inherits:
EffectBase
Audio-reactive effect: a noise field modulated by sound level.
Author: Andrew Tuline (WLED-SR), via the predecessor, https://github.com/ewowi/MoonLight/blob/main/src/MoonLight/Nodes/Effects/E_WLED.h
A vertical meter whose height tracks the sound level and whose color is a scrolling noise field. So a loud moment fills the panel bottom-up with a drifting gradient rather than a flat bar.
Prior art: WLED's Noisemeter, whose mapping and field sampling this reproduces.
Public Attributes¶
uint8_t fadeRate = 240
: The per-frame fade, which is the motion trail.
uint8_t width = 128
: How much of the column a given level fills.
Public Methods¶
virtual inline const char * tags() const override
: Catalog tags: WLED origin, audio-reactive.
virtual inline Dim dimensions() const override
: Writes the x=0 column, which extrude fans across x and z.
virtual inline void defineControls() override
: Publish the trail and the meter's gain.
virtual inline void tick() override
: Light the column to the current level, coloring each row from the scrolling field.
More info¶
The color depends only on the row¶
Each lit row samples a field that both scrolls on its own phases and is modulated by the level. Since nothing varies along x, the effect writes the x=0 column and extrude fans it across. The meter then reads as one wide block without this effect duplicating the broadcast itself.