Skip to content

VuMetersEffect

Source: VuMetersEffect.h

VuMetersEffect

class VuMetersEffect
src/light/effects/VuMetersEffect.h:26

Inherits: EffectBase

Effect: sixteen VU needles with real mass, one per band, with peak-hold and a red zone.

VuMetersEffect card VuMetersEffect controls

What makes a VU meter beautiful is the needle's mass rather than the dial. A physical meter is a spring and a damper, so the needle overshoots a peak and settles back. That overshoot is why a mechanical meter reads as alive where a bar graph reads as a readout.

Prior art: IEC 60268-17, which specifies 300 ms to 99% with 1 to 1.5% overshoot.

Public Attributes

uint8_t damping = 150 : How much the needle overshoots: low swings, high is critically damped.

uint8_t response = 120 : How quickly the needle chases the signal at all.

uint8_t peakHold = 200 : How long the peak marker stays up.

bool smooth = false : Drive from the smoothed ballistic rather than the raw band.

Public Methods

virtual inline const char * tags() const override : Catalog tags for the visual catalog.

virtual inline Dim dimensions() const override : A plane of dials, where a cube gets one bank per slice.

virtual inline void defineControls() override : Publish the needle's mechanics and the peak-hold.

virtual inline void prepare() override : Rest every needle and clear its peak.

virtual inline void tick() override : Integrate every needle, then tile the bank and draw each dial.

More info

Each band drives a damped harmonic oscillator

damping sets the overshoot: high is a critically damped studio meter, low a loose needle. The bass needles are heavier than the treble ones, as on a real multi-meter bridge. So the low end swings where the high end flickers.

Each needle sweeps its own arc in its own cell, with a red zone past three quarters. A peak marker holds the highest reading and falls slowly, which is the standard meter's other half.