Contents

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_rate

The sample rate in Hz.

sag_amount

How much gain reduction the envelope can cause, in [0, 1].

recovery_time_seconds

The envelope follower's one-pole time constant.

float process_sample(float input)

Processes one sample: updates the envelope, then applies gain reduction.

Parameters

input

The input sample.

Returns

The dynamically gain-reduced output sample. Always finite.

void reset()

Clears the envelope follower's state.