A level meter. More...
#include <Resonant/LimiterAlgorithm.hpp>
Public Member Functions | |
| LevelMeasurement () | |
| Creates a new level meter (no further initializations needed) | |
| const T & | peak () const |
| Current peak value. | |
| void | put (T vabs, unsigned holdTime) |
| Puts a new sample to the meter. More... | |
| void | put (T value, T vfloor, unsigned holdTime) |
| Puts a new sample to the meter. More... | |
| void | reset () |
| Resets level to zero. | |
| void | reset (T value) |
| Resets level to zero. | |
Protected Attributes | |
| unsigned | m_time |
| T | m_v1 |
| T | m_v2 |
A level meter.
This class is completely inlined.
A level meter measures signal amplitude. It is assumed that the signal is always positive (take absolute value of your data, before feeding it here, if necessary).
|
inline |
Puts a new sample to the meter.
| vabs | New sample (absolute value) |
| holdTime | Time to hold the peak value |
|
inline |
Puts a new sample to the meter.
| value | New sample |
| vfloor | Floor value |
| holdTime | Time to hold the peak value |