![]() |
VCV Rack API v2
|
Models a VU meter with smoothing. More...
#include <vumeter.hpp>
Public Types | |
| enum | Mode { PEAK , RMS } |
Public Member Functions | |
| void | reset () |
| void | process (float deltaTime, float value) |
| float | getBrightness (float dbMin, float dbMax) |
| Returns the LED brightness measuring tick marks between dbMin and dbMax. | |
Public Attributes | |
| Mode | mode = PEAK |
| float | v = 0.f |
| Either the smoothed peak or the mean-square of the brightness, depending on the mode. | |
| float | lambda = 30.f |
| Inverse time constant in 1/seconds. | |
Models a VU meter with smoothing.
Supports peak and RMS (root-mean-square) metering. Usage example for a strip of lights with 3dB increments:
|
inline |
|
inline |
|
inline |
Returns the LED brightness measuring tick marks between dbMin and dbMax.
For example, getBrightness(-6.f, 0.f) will be at minimum brightness at -6dB and maximum brightness at 0dB. Set dbMin == dbMax == 0.f for a clip indicator that turns fully on when db >= dbMax. Expensive, so call this infrequently.
| float rack::dsp::VuMeter2::v = 0.f |
Either the smoothed peak or the mean-square of the brightness, depending on the mode.
| float rack::dsp::VuMeter2::lambda = 30.f |
Inverse time constant in 1/seconds.