Discoverable name for Pulp's established peak/RMS envelope follower. More...
#include <dynamics_contract.hpp>
Public Types | |
| using | Base = BallisticsFilterT<SampleType> |
| using | Mode = typename Base::Mode |
| enum | TimeConvention |
Public Member Functions | |
| EnvelopeFollowerT () | |
| void | prepare (float sample_rate) |
| void | set_attack_ms (float ms) |
| void | set_release_ms (float ms) |
| void | set_mode (Mode m) |
| float | process (float input) |
| void | process (const float *input, float *output, int num_samples) |
| float | current () const |
| float | current_db (float floor_db=float{-160}) const |
Current envelope in dBFS, floored at floor_db. | |
| float | attack_ms () const noexcept |
| float | release_ms () const noexcept |
| float | attack_coefficient () const noexcept |
| float | release_coefficient () const noexcept |
| void | reset () |
Static Public Member Functions | |
| static SampleType | coefficient_for_time_ms (SampleType ms, SampleType sample_rate) |
| static float | coefficient_for_time_ms (float ms, float sample_rate) |
| Legacy nominal coefficient retained for bit-identical BallisticsFilter output. | |
| static float | exact_coefficient_for_time_ms (float ms, float sample_rate) |
| Pure coefficient for an exact 10-to-90-percent state-domain interval. | |
Protected Member Functions | |
| void | synchronize_detector_state (float state) noexcept |
Friends | |
| template<typename> | |
| class | StereoEnvelopeFollowerT |
Discoverable name for Pulp's established peak/RMS envelope follower.
Input is a raw signed audio sample in the linear amplitude domain. Peak mode rectifies it; RMS mode squares before smoothing and square-roots the result. Attack and release are exact 10-to-90-percent times in milliseconds in the smoothed-state domain: amplitude for peak mode and mean-square power for RMS mode. BallisticsFilterT remains the legacy-compatible spelling with its historical nominal 2.2 exponent; this type selects the exact ln(9) contract without changing existing BallisticsFilter output.
| using pulp::signal::EnvelopeFollowerT< SampleType >::Base = BallisticsFilterT<SampleType> |
| using pulp::signal::EnvelopeFollowerT< SampleType >::Mode = typename Base::Mode |
|
stronginherited |
|
inline |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlinestaticinherited |
Legacy nominal coefficient retained for bit-identical BallisticsFilter output.
The historical 2.2 exponent approximates, but does not exactly equal, a 10-to-90-percent interval. New code needing the exact contract should use EnvelopeFollowerT from dynamics_contract.hpp.
|
inlinestatic |
|
inlineinherited |
|
inlineinherited |
Current envelope in dBFS, floored at floor_db.
A non-finite or positive floor is malformed and uses -160 dBFS. The return value is always finite, including after hostile detector input.
|
inlinestaticinherited |
Pure coefficient for an exact 10-to-90-percent state-domain interval.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineprotectednoexceptinherited |
|
friend |