IAudioEffect<T>

Interfaces · AiDotNet.Interfaces

Defines the contract for audio effects processors.

Known implementations: AudioEffectBase<T>

For Beginners

Audio effects are like Instagram filters for sound!

Common effects explained:

  • Reverb: Adds room ambience (makes it sound like you’re in a hall)
  • Delay: Creates echoes of the sound
  • Compressor: Evens out loud and quiet parts (used in podcasts)
  • EQ: Boosts or cuts certain frequencies (more bass, less treble)
  • Pitch Shift: Makes voice higher or lower

Effects can be:

  • Chained: One after another (guitar -> distortion -> reverb -> amp)
  • Real-time: Process audio live as it plays
  • Offline: Process entire files for best quality

How It Works

Audio effects modify sound in creative or corrective ways:

  • Dynamics: Compressor, Limiter, Gate, Expander
  • EQ: Parametric EQ, Graphic EQ, Filters
  • Time-based: Reverb, Delay, Echo
  • Modulation: Chorus, Flanger, Phaser, Tremolo
  • Pitch: Pitch Shifter, Auto-Tune, Harmonizer
  • Distortion: Overdrive, Fuzz, Saturation

Properties

Property Summary
IReadOnlyDictionary<string, AudioEffectParameter<T>> Parameters { get; } Gets all adjustable parameters for this effect.
bool Bypass { get; set; } Gets or sets whether the effect is bypassed (disabled).
double Mix { get; set; } Gets or sets the dry/wet mix (0.0 = dry only, 1.0 = wet only).
int LatencySamples { get; } Gets the processing latency in samples.
int SampleRate { get; } Gets the sample rate this effect operates at.
int TailSamples { get; } Gets the tail length in samples (how long the effect rings out after input stops).
string Name { get; } Gets the name of this effect.

Methods

Method Summary
T GetParameter(string name) Gets a parameter value by name.
T ProcessSample(T sample) Processes a single sample (for real-time use).
Tensor<T> Process(Tensor<T> input) Processes audio through the effect.
void ProcessInPlace(Span<T> buffer) Processes audio in-place for efficiency.
void Reset() Resets the effect’s internal state.
void SetParameter(string name, T value) Sets a parameter value by name.