24            return (
dBScaled >= 0.0) ? 1.0 : 0.0;
 
 
 
   64    void process(
float deltaTime, 
float value) {
 
   66            value = std::pow(value, 2);
 
   67            v += (value - 
v) * 
lambda * deltaTime;
 
   70            value = std::fabs(value);
 
   75                v += (value - 
v) * 
lambda * deltaTime;
 
 
 
#define DEPRECATED
Attribute for deprecated functions and symbols.
Definition common.hpp:26
 
Digital signal processing routines and classes.
Definition approx.hpp:6
 
T amplitudeToDb(T amp)
Definition common.hpp:44
 
DEPRECATED typedef VuMeter VUMeter
Definition vumeter.hpp:32
 
int clamp(int x, int a, int b)
Limits x between a and b.
Definition math.hpp:32
 
float rescale(float x, float xMin, float xMax, float yMin, float yMax)
Rescales x from the range [xMin, xMax] to [yMin, yMax].
Definition math.hpp:151
 
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
 
Models a VU meter with smoothing.
Definition vumeter.hpp:49
 
float lambda
Inverse time constant in 1/seconds.
Definition vumeter.hpp:58
 
Mode mode
Definition vumeter.hpp:54
 
void process(float deltaTime, float value)
Definition vumeter.hpp:64
 
void reset()
Definition vumeter.hpp:60
 
Mode
Definition vumeter.hpp:50
 
@ RMS
Definition vumeter.hpp:52
 
@ PEAK
Definition vumeter.hpp:51
 
float v
Either the smoothed peak or the mean-square of the brightness, depending on the mode.
Definition vumeter.hpp:56
 
float getBrightness(float dbMin, float dbMax)
Returns the LED brightness measuring tick marks between dbMin and dbMax.
Definition vumeter.hpp:85
 
Deprecated.
Definition vumeter.hpp:10
 
void setValue(float v)
Value should be scaled so that 1.0 is clipping.
Definition vumeter.hpp:15
 
float dBScaled
Definition vumeter.hpp:13
 
float dBInterval
Decibel level difference between adjacent meter lights.
Definition vumeter.hpp:12
 
float getBrightness(int i)
Returns the brightness of the light indexed by i.
Definition vumeter.hpp:22