class
SushiDSP::PowerSupplySagStage
Models power-supply sag: an envelope follower on the rectified signal drives a dynamic gain-reduction factor, so sustained loud playing compresses ("bloom").
- Declared in
include/SushiDSP/circuits/stages/PowerSupplySagStage.hpp
Public member functions
PowerSupplySagStage(double sample_rate, float sag_amount, float recovery_time_seconds)Parameters
sample_rateThe sample rate in Hz.
sag_amountHow much gain reduction the envelope can cause, in [0, 1].
recovery_time_secondsThe envelope follower's one-pole time constant.
float process_sample(float input)Processes one sample: updates the envelope, then applies gain reduction.
Parameters
inputThe input sample.
Returns
The dynamically gain-reduced output sample. Always finite.
void reset()Clears the envelope follower's state.

