Class SaturationEffect
Wave-shaping saturation / soft-clip with selectable curve, input drive and output trim. Optional 2× or 4× oversampling moves the harmonics the non-linearity generates above the audible band before they can alias back down.
public sealed class SaturationEffect : AudioEffect, IAudioEffect, IParameterized
- Inheritance
-
SaturationEffect
- Implements
- Inherited Members
Properties
Curve
Transfer curve. Default Tanh.
public SaturationCurve Curve { get; set; }
Property Value
DriveDb
Input drive in dB applied before the curve. Default 6 dB.
public float DriveDb { get; set; }
Property Value
OutputGainDb
Output trim in dB applied after the curve. Default 0 dB.
public float OutputGainDb { get; set; }
Property Value
OversampleFactor
Oversampling factor: 1, 2 or 4. Default 2.
public int OversampleFactor { get; set; }
Property Value
Parameters
Generic parameter list (excludes Bypass/Mix, which are on the base).
public IReadOnlyList<EffectParameter> Parameters { get; }
Property Value
Methods
OnConfigure(WaveFormat)
Called by Configure(WaveFormat) after the format is stored. Derived effects allocate and size their sample-rate-dependent state here.
protected override void OnConfigure(WaveFormat format)
Parameters
formatWaveFormat
ProcessBlock(Span<float>)
Transforms buffer in place into the fully-wet signal. The
base class handles dry/wet mixing and bypass around this call.
protected override void ProcessBlock(Span<float> buffer)
Parameters
Reset()
Clears internal state (delay lines, envelopes, smoothers) so the next block starts as if from silence.
public override void Reset()