Table of Contents

Class TremoloEffect

Namespace
NAudio.Effects
Assembly
NAudio.Core.dll

Tremolo (LFO amplitude modulation). With AutoPan enabled on a stereo signal it instead sweeps the signal between the speakers (constant-power auto-pan).

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

Properties

AutoPan

When true (and stereo), auto-pan instead of amplitude tremolo.

public bool AutoPan { get; set; }

Property Value

bool

Depth

Modulation depth, 0 (no effect) to 1 (full). Default 0.5.

public float Depth { 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>

RateHz

Modulation rate in Hz. Default 5 Hz.

public float RateHz { get; set; }

Property Value

float

Waveform

LFO waveform. Default Sine.

public LfoWaveform Waveform { get; set; }

Property Value

LfoWaveform

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()

SyncToTempo(double, NoteDivision)

Locks RateHz to a tempo and note division.

public void SyncToTempo(double bpm, NoteDivision division)

Parameters

bpm double
division NoteDivision