Class GateEffect
Noise gate / downward expander. Below the threshold the signal is attenuated; with a high Ratio it behaves as a hard gate, with a lower ratio as a gentle expander. Includes hysteresis (separate open/close points), a hold time to avoid chatter, and independent attack/release. Detection is channel-linked.
public sealed class GateEffect : AudioEffect, IAudioEffect, IParameterized
- Inheritance
-
GateEffect
- Implements
- Inherited Members
Properties
AttackMs
Attack (open) time in milliseconds. Default 1 ms.
public float AttackMs { get; set; }
Property Value
GainReductionDb
The most recent gain reduction in dB (≥ 0), for metering.
public float GainReductionDb { get; }
Property Value
HoldMs
Hold time in milliseconds before the gate is allowed to close. Default 10 ms.
public float HoldMs { get; set; }
Property Value
HysteresisDb
Hysteresis in dB: the gate re-closes this far below the threshold. Default 3 dB.
public float HysteresisDb { get; set; }
Property Value
Parameters
Generic parameter list (excludes Bypass/Mix, which are on the base).
public IReadOnlyList<EffectParameter> Parameters { get; }
Property Value
RangeDb
Maximum attenuation in dB when fully closed (negative). Default -80 dB.
public float RangeDb { get; set; }
Property Value
Ratio
Expansion ratio; higher is more gate-like. Default 10.
public float Ratio { get; set; }
Property Value
ReleaseMs
Release (close) time in milliseconds. Default 100 ms.
public float ReleaseMs { get; set; }
Property Value
ThresholdDb
Level (dBFS) below which the gate starts to close. Default -40 dB.
public float ThresholdDb { get; set; }
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()