Table of Contents

Class TransientShaperEffect

Namespace
NAudio.Effects
Assembly
NAudio.Core.dll

Transient shaper. A fast and a slow envelope follower track the signal; their difference distinguishes the attack (onset) of a sound from its sustain (body). AttackDb boosts or cuts the attack portion and SustainDb the sustain portion, independent of input level. Detection is channel-linked so the stereo image is preserved.

public sealed class TransientShaperEffect : AudioEffect, IAudioEffect, IParameterized
Inheritance
TransientShaperEffect
Implements
Inherited Members

Properties

AttackDb

Attack (transient) gain in dB; positive sharpens, negative softens. Default 0.

public float AttackDb { get; set; }

Property Value

float

FastMs

Fast-envelope time constant in ms. Default 2 ms.

public float FastMs { get; set; }

Property Value

float

Parameters

Generic parameter list (excludes Bypass/Mix, which are on the base).

public IReadOnlyList<EffectParameter> Parameters { get; }

Property Value

IReadOnlyList<EffectParameter>

SlowMs

Slow-envelope time constant in ms. Default 80 ms.

public float SlowMs { get; set; }

Property Value

float

SustainDb

Sustain (body) gain in dB; positive lengthens, negative tightens. Default 0.

public float SustainDb { get; set; }

Property Value

float

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

format WaveFormat

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

buffer Span<float>

Reset()

Clears internal state (delay lines, envelopes, smoothers) so the next block starts as if from silence.

public override void Reset()