Professional Audio Effects Reference

Complete reference for all 15+ professional-grade audio effects with detailed parameter specifications, preset configurations, and usage examples.

Zero-Allocation Design All effects are optimized for real-time audio with zero-allocation processing, SIMD operations where applicable, and lock-free operation for professional audio applications.

Overview

Every effect in OwnaudioSharp implements the IEffectProcessor interface and provides:

Dynamics Processing

DYNAMICS

CompressorEffect

Professional dynamic range compressor with soft-knee design, envelope following, and adaptive gain control. Used to control the dynamic range of audio signals by reducing the volume of loud sounds above a threshold while leaving quieter sounds unaffected. In professional mixing, compressors are essential for vocal processing to ensure consistent levels, taming drum transients, and gluing mix elements together. Common applications include broadcast normalization, podcast production for consistent speech levels, and mastering to increase perceived loudness. Use gentle ratios (2:1 to 4:1) for transparent control, or higher ratios (8:1+) for aggressive limiting-style compression on vocals and drums.

Parameters

Threshold
float - Compression threshold level
Range: 0.0 - 1.0 (linear amplitude)
Ratio
float - Compression ratio
Range: 1.0 - 100.0 (N:1)
AttackTime
float - Attack time in milliseconds
Range: 0.1 - 1000.0 ms
ReleaseTime
float - Release time in milliseconds
Range: 1.0 - 2000.0 ms
MakeupGain
float - Output gain compensation
Range: 0.1 - 10.0 (linear multiplier)

Presets

Default VocalGentle VocalAggressive Drums Bass MasteringLimiter Vintage
DYNAMICS

LimiterEffect

Brick-wall peak limiter with look-ahead, adaptive release, and zero-allocation buffer management. Prevents audio peaks from exceeding a specified ceiling, making it essential as the final stage in mastering chains to prevent digital clipping and maximize loudness. Professional engineers use limiters on master buses to achieve competitive loudness levels for streaming platforms while maintaining audio quality. The look-ahead feature allows the limiter to anticipate peaks and apply gain reduction smoothly, preventing distortion. Ideal for broadcast applications where strict peak levels must be maintained, live sound reinforcement to protect speakers, and podcast/streaming content to meet platform loudness standards (e.g., -14 LUFS for Spotify).

Parameters

Threshold
float - Threshold in dB
Range: -20.0 - 0.0 dB
Ceiling
float - Output ceiling in dB
Range: -2.0 - 0.0 dB
Release
float - Release time in milliseconds
Range: 1.0 - 1000.0 ms
LookAheadMs
float - Look-ahead time in milliseconds
Range: 1.0 - 20.0 ms

Presets

Default Mastering Broadcast Live DrumBus VocalSafety Bass Podcast Aggressive
DYNAMICS

AutoGainEffect

Automatic gain control with intelligent noise gating, look-ahead detection, and smooth gain transitions. Automatically adjusts audio levels to maintain a consistent output volume regardless of input variations, making it perfect for live streaming, video conferencing, and podcast recording where speaker distance from the microphone varies. The integrated noise gate prevents background noise from being amplified during quiet passages. Professional applications include broadcast automation systems, conference room audio systems, and content creation workflows where manual gain riding isn't practical. Use the Voice preset for speech applications or Music preset for dynamic music content that needs level consistency without destroying musical dynamics.

Parameters

TargetLevel
float - Target output level
Range: 0.01 - 1.0 (linear amplitude)
AttackCoefficient
float - Attack smoothing coefficient
Range: 0.9 - 0.999
ReleaseCoefficient
float - Release smoothing coefficient
Range: 0.9 - 0.9999
GateThreshold
float - Noise gate threshold
Range: 0.0001 - 0.01
MaximumGain
float - Maximum gain limit
Range: 1.0 - 10.0
MinimumGain
float - Minimum gain limit
Range: 0.1 - 1.0

Presets

Default Music Voice Broadcast Live
DYNAMICS

DynamicAmpEffect

Adaptive volume control with dual-window RMS detection, smart noise gating, and gain change limiting for transparent dynamics management. Uses RMS (Root Mean Square) level detection to measure perceived loudness rather than just peak levels, providing more musical and transparent gain adjustment. Ideal for normalizing content with varying loudness levels such as playlist playback, audiobook production, and archival audio restoration. The dual-window approach analyzes both short-term and long-term levels to avoid pumping artifacts while maintaining consistent perceived volume. Professional use cases include broadcast playout systems, background music systems in commercial spaces, and automatic level correction for user-generated content platforms. The Transparent preset is excellent for mastering applications where subtle level correction is needed without audible processing.

Parameters

TargetLevel
float - Target RMS level in dB
Range: -60.0 - -3.0 dB
AttackTime
float - Attack time in seconds
Range: 0.05 - ∞ seconds
ReleaseTime
float - Release time in seconds
Range: 0.2 - ∞ seconds
NoiseGateThreshold
float - Noise gate threshold in dB
Range: -80.0 - -30.0 dB
MaxGain
float - Maximum gain value
Range: 1.0 - 20.0
MaxGainReduction
float - Maximum gain reduction in dB
Range: 3.0 - 40.0 dB

Presets

Default Speech Music Broadcast Mastering Live Transparent

Frequency Processing

FREQUENCY

EqualizerEffect (10-Band)

Professional 10-band parametric equalizer with cascaded biquad filters (2 per band) and Direct Form II Transposed implementation for numerical stability. Provides precise frequency shaping across the entire audible spectrum using industry-standard ISO frequencies, making it essential for corrective EQ, tonal shaping, and mix balancing. In professional studios, 10-band EQs are used for room correction, instrument tone shaping, and fixing frequency masking issues between mix elements. The cascaded filter design ensures steep, musical curves without phase distortion. Common applications include removing muddiness from vocals (cut 200-400 Hz), adding presence to guitars (boost 2-4 kHz), enhancing bass punch (boost 60-100 Hz), and de-essing harsh sibilance (cut 6-8 kHz). Use subtle adjustments (±3 dB) for transparent corrections or more aggressive settings (±6-12 dB) for creative sound design.

Parameters

Band0-9 Gain
float - Gain for each band in dB
Range: -12.0 - +12.0 dB
Mix
float - Wet/dry mix
Range: 0.0 - 1.0

ISO Frequencies

31.25 Hz, 62.5 Hz, 125 Hz, 250 Hz, 500 Hz, 1 kHz, 2 kHz, 4 kHz, 8 kHz, 16 kHz

Presets

Default Bass Treble Rock Classical Pop Jazz Voice
FREQUENCY

Equalizer30BandEffect

High-resolution 30-band graphic equalizer with professional frequencies from 20 Hz to 16 kHz, optimized Q factors, and single filter per band for natural sound. Offers surgical precision for frequency correction and sound system tuning with 1/3-octave resolution, the industry standard for live sound and installation work. Professional sound engineers use 30-band EQs for speaker system optimization, feedback elimination in live venues, and detailed room acoustic correction. The high band count allows for precise notch filtering to remove problematic resonances without affecting adjacent frequencies. Essential for PA system tuning in concert halls, correcting room modes in home theaters, broadcast studio monitor calibration, and creating custom listening curves for different speaker types. The narrow bands make it ideal for identifying and eliminating feedback frequencies during live performances while maintaining overall tonal balance.

Parameters

Band[0-29] Gain
float - Gain for each band in dB
Range: -18.0 - +18.0 dB
Mix
float - Wet/dry mix
Range: 0.0 - 1.0

Presets

Default Bass Treble Rock Classical Pop Jazz Voice Electronic Acoustic
FREQUENCY

EnhancerEffect

Psychoacoustic enhancer with high-pass filtering, harmonic saturation, and soft clipping for added presence and clarity. Generates harmonically-related overtones that make audio sound brighter, more detailed, and more present in a mix without simply boosting high frequencies. Professional mixing engineers use enhancers to add "air" and "sparkle" to vocals, make instruments cut through dense mixes, and restore high-frequency detail lost in compression or low-quality recordings. The harmonic saturation creates pleasing musical harmonics similar to analog tape and tube equipment. Ideal for adding vocal presence in broadcast applications, enhancing acoustic guitar recordings, bringing life to dull or over-compressed masters, and making podcast voices sound more professional and engaging. Use the VocalClarity preset for speech applications or AcousticSparkle for bringing out detail in acoustic instruments without harshness.

Parameters

Mix
float - Wet/dry mix amount
Range: 0.0 - 1.0
Gain
float - Pre-saturation amplification
Range: 0.1 - 10.0
CutoffFrequency
float - High-pass filter cutoff in Hz
Range: 100.0 - 20000.0 Hz

Presets

Default VocalClarity RockEdge AcousticSparkle MixCutter Broadcast

Modulation Effects

MODULATION

ChorusEffect

Multi-voice chorus with LFO modulation, fractional delay interpolation, and 2-6 independent voices for rich detuning effects. Creates the illusion of multiple instruments or voices playing in unison by generating slightly detuned and time-shifted copies of the original signal, adding width, depth, and movement to sounds. Professional producers use chorus extensively on electric guitars to achieve the classic 80s clean tone, on synth pads to create lush evolving textures, and on bass guitars for added thickness without muddiness. The multiple independent voices with phase-offset LFOs create a more natural, ensemble-like effect than simple single-voice chorus. Essential for creating vintage synthesizer sounds, thickening backing vocals, adding dimension to clean electric guitar parts, and making mono sources feel wider in a stereo mix. Use 2-3 voices with slow rates for subtle thickening, or 4-6 voices with faster rates for dramatic, swirling effects.

Parameters

Rate
float - LFO modulation rate in Hz
Range: 0.1 - 10.0 Hz
Depth
float - Modulation depth
Range: 0.0 - 1.0
Mix
float - Wet/dry mix
Range: 0.0 - 1.0
Voices
int - Number of chorus voices
Range: 2 - 6

Presets

Default VocalSubtle VocalLush GuitarClassic GuitarShimmer SynthPad StringEnsemble VintageAnalog Extreme
MODULATION

FlangerEffect

Classic flanging effect with variable delay modulation, feedback control, and LFO-driven comb filtering for sweeping tones. Produces the iconic "jet plane" swooshing sound by mixing the original signal with a delayed copy whose delay time is continuously modulated, creating moving comb filter notches. Originally discovered by manually varying tape playback speed, flanging is now a staple effect in rock, electronic, and experimental music production. Professional applications include adding movement to electric guitar solos, creating psychedelic vocal effects, enhancing drum loops with rhythmic sweeps, and designing sci-fi sound effects for film and games. The feedback parameter controls the intensity and resonance of the sweeping effect. Use subtle settings (low depth, low feedback) for gentle movement on rhythm guitars, or extreme settings (high depth, high feedback) for dramatic, metallic sweeps on lead instruments and special effects. The JetPlane preset delivers the classic through-zero flanging sound.

Parameters

Rate
float - LFO rate in Hz
Range: 0.1 - 5.0 Hz
Depth
float - Modulation depth
Range: 0.0 - 1.0
Feedback
float - Feedback amount
Range: 0.0 - 0.95
Mix
float - Wet/dry mix
Range: 0.0 - 1.0

Presets

Default Classic JetPlane SubtleChorus VocalDoubling GuitarLead AmbientWash Percussive
MODULATION

PhaserEffect

Multi-stage phaser with all-pass filters (2-8 stages), LFO modulation sweeping from 200 Hz to 2 kHz, and feedback control. Creates sweeping notches in the frequency spectrum without affecting the overall amplitude, producing a distinctive swirling, "whooshing" character that's less metallic than flanging. Phasers are iconic in funk, rock, and electronic music, famously used on electric piano (Fender Rhodes), guitar, and synthesizers. Professional producers use phasers to add movement and interest to static sounds, create vintage keyboard tones, and add psychedelic character to vocals and guitars. The number of stages determines the complexity of the effect—more stages create deeper, more pronounced sweeps with multiple notches. Essential for recreating 70s funk keyboard sounds, adding subtle movement to pad synthesizers, creating rotating speaker effects, and designing evolving ambient textures. Use 4 stages for classic vintage tones, or 6-8 stages for more dramatic, modern phasing effects.

Parameters

Rate
float - LFO rate in Hz
Range: 0.1 - 10.0 Hz
Depth
float - Modulation depth
Range: 0.0 - 1.0
Feedback
float - Feedback amount
Range: 0.0 - 0.95
Mix
float - Wet/dry mix
Range: 0.0 - 1.0
Stages
int - Number of all-pass filter stages
Range: 2 - 8

Presets

Default Vintage Ambient Tremolo DeepSpace GuitarSolo Vocal SynthPad
MODULATION

RotaryEffect

Leslie speaker simulator with separate horn and rotor, crossover filtering at 800 Hz, and fast/slow speed switching. Emulates the iconic Leslie rotating speaker cabinet originally designed for Hammond organs, which uses physically spinning horn and rotor drivers to create Doppler pitch shifting and amplitude modulation. The effect produces a rich, three-dimensional sound with complex modulation that's impossible to achieve with standard chorus or phaser effects. Professional organists and keyboard players rely on Leslie simulation for authentic Hammond B3 tones, while guitarists use it for psychedelic textures and ambient soundscapes. The separate horn (high frequencies) and rotor (low frequencies) spin at different speeds, creating the characteristic Leslie sound. Essential for gospel, jazz, and rock organ parts, adding vintage character to electric guitars, and creating evolving pad sounds on synthesizers. The fast/slow speed switch mimics the original Leslie's acceleration/deceleration behavior, allowing for dramatic performance dynamics.

Parameters

HornSpeed
float - Horn rotation speed in Hz
Range: 2.0 - 15.0 Hz
RotorSpeed
float - Rotor rotation speed in Hz
Range: 0.5 - 5.0 Hz
Intensity
float - Effect intensity
Range: 0.0 - 1.0
Mix
float - Wet/dry mix
Range: 0.0 - 1.0
IsFast
bool - Fast/slow speed switch
true = fast (3x horn, 2x rotor)

Presets

Default Hammond Gospel Rock Jazz Psychedelic VintageSlow VintageFast Subtle

Spatial Effects

SPATIAL

ReverbEffect

Extended Freeverb algorithm with 8 comb filters + 4 all-pass filters per channel, 20ms pre-delay, stereo spread, and damping control. Simulates the natural reflections and reverberation of acoustic spaces, from small rooms to massive cathedrals, adding depth, dimension, and spatial context to dry recordings. Reverb is arguably the most important spatial effect in music production, used on virtually every professional mix to create cohesion and place sounds in a believable acoustic environment. The damping control simulates high-frequency absorption in real rooms, while the pre-delay separates the direct sound from the reverb tail for clarity. Professional applications include adding natural ambience to close-miked vocals and instruments, creating dramatic spaces for cinematic scores, gluing mix elements together with a common acoustic signature, and designing otherworldly soundscapes for electronic music. Use short room reverbs (0.3-0.5 room size) for intimate vocals, medium hall settings (0.6-0.8) for orchestral and acoustic music, or large cathedral settings (0.9+) for epic, spacious effects.

Parameters

RoomSize
float - Room size
Range: 0.0 - 1.0
Damping
float - High-frequency damping
Range: 0.0 - 1.0
WetLevel
float - Wet signal level
Range: 0.0 - 1.0
DryLevel
float - Dry signal level
Range: 0.0 - 1.0
Width (StereoWidth)
float - Stereo width
Range: 0.0 - 2.0
Mix
float - Master wet/dry mix
Range: 0.0 - 1.0
Gain
float - Output gain
Range: 0.0 - ∞

Presets

Default SmallRoom LargeHall Cathedral Plate Spring AmbientPad VocalBooth DrumRoom Gated Subtle
SPATIAL

DelayEffect

Echo/delay with feedback, damping filter, and up to 5 seconds delay time. Supports fractional delay with linear interpolation. Creates distinct repetitions of the input signal at specified time intervals, ranging from short slapback echoes to long, evolving delay trails. Delay is fundamental in modern music production, used to add depth, create rhythmic patterns, and build complex soundscapes. Professional engineers use delays for vocal doubling effects (20-40ms), creating space in mixes without the diffusion of reverb, and designing rhythmic elements that sync to the song tempo. The feedback control determines how many repetitions occur, while damping simulates the natural high-frequency loss in analog tape delays. Essential for dub and reggae production (long delays with high feedback), rock guitar solos (slapback and dotted-eighth delays), electronic music (rhythmic delays synced to tempo), and ambient soundscapes (long, filtered delay trails). Use short delays (50-120ms) for thickening and stereo width, medium delays (250-500ms) for rhythmic effects, or long delays (1000ms+) for ambient washes and creative sound design.

Parameters

Time
int - Delay time in milliseconds
Range: 1 - 5000 ms
Repeat
float - Feedback amount
Range: 0.0 - 1.0
Mix
float - Wet/dry mix
Range: 0.0 - 1.0
Damping
float - High-frequency damping in feedback
Range: 0.0 - 1.0

Presets

Default SlapBack ClassicEcho Ambient Rhythmic PingPong TapeEcho Dub Thickening

Distortion Effects

DISTORTION

DistortionEffect

Soft-clipping distortion with drive control and output gain compensation. Uses smooth saturation curve for musical harmonics. Adds harmonic distortion by progressively clipping the audio waveform, creating everything from subtle warmth to aggressive, saturated tones. Unlike hard clipping which creates harsh digital artifacts, soft clipping produces smooth, musical harmonics similar to overdriven analog equipment. Professional producers use distortion to add character and aggression to guitars, bass, drums, and even vocals, or to create lo-fi and vintage textures. The drive parameter controls the amount of saturation, while output gain compensates for the perceived loudness increase. Essential for rock and metal guitar tones, adding grit to bass guitars, creating aggressive electronic music sounds, and adding analog-style warmth to digital recordings. Use low drive settings (1-3) for subtle harmonic enhancement and warmth, medium settings (4-6) for classic rock overdrive, or high settings (7-10) for heavy metal and industrial sounds. The VocalSaturation preset adds subtle harmonic richness to vocals without obvious distortion.

Parameters

Drive
float - Drive amount
Range: 1.0 - 10.0
Mix
float - Wet/dry mix
Range: 0.0 - 1.0
OutputGain
float - Output gain compensation
Range: 0.1 - 1.0

Presets

Default WarmOverdrive ClassicRock HeavyMetal VintageTube BassDrive FuzzBox VocalSaturation DigitalCrush
DISTORTION

OverdriveEffect

Tube-style overdrive with asymmetric saturation, tone control (0=dark, 1=bright), and musical harmonics. Emulates the warm, dynamic response of overdriven vacuum tube amplifiers, producing rich even-order harmonics that are perceived as musical and pleasing. The asymmetric saturation mimics how real tubes clip positive and negative waveform peaks differently, creating a more organic, responsive feel compared to symmetric distortion. Professional guitarists and producers use overdrive for classic rock and blues tones, adding warmth to bass guitars, and creating vintage character on keyboards and vocals. The tone control shapes the frequency response from dark and smooth to bright and cutting, allowing the effect to work across different instruments and musical styles. Ideal for blues and classic rock guitar tones, adding analog warmth to digital synthesizers, creating vintage-style bass saturation, and adding subtle harmonic excitement to mix buses. Use the CleanBoost preset for transparent gain with minimal coloration, Blues for smooth mid-gain tones, or Screamer for the iconic mid-focused overdrive sound popularized by the Ibanez Tube Screamer.

Parameters

Gain
float - Input gain
Range: 1.0 - 5.0
Tone
float - Tone control
Range: 0.0 - 1.0 (0=dark, 1=bright)
Mix
float - Wet/dry mix
Range: 0.0 - 1.0
OutputLevel
float - Output level
Range: 0.1 - 1.0

Presets

Default CleanBoost Blues RockCrunch Lead VintageTube Bass Screamer

Master Processing

MASTER

SmartMasterEffect

Comprehensive master processing chain with intelligent auto-calibration for optimal sound across different speaker systems. Combines professional-grade effects with measurement-based optimization.

Overview

SmartMaster is an all-in-one mastering solution that adapts to your specific speaker system and listening environment. It features factory presets for common playback systems and an intelligent calibration wizard that measures your actual speaker response.

Measurement Microphone Required for Auto-Calibration
The auto-calibration wizard requires an external measurement microphone to analyze your speaker system. Without a measurement microphone, you can use the factory presets which provide excellent results for common speaker types.

Important: The system optimizes audio for the measurement microphone's position. Place the microphone at your primary listening position for best results. The calibrated system will sound optimal at that specific location.

Processing Chain

  1. 31-Band Graphic EQ - Precise frequency shaping (20 Hz - 16 kHz)
  2. Subharmonic Synthesizer - Enhanced low-frequency extension below speaker cutoff
  3. Multiband Compressor - Dynamic range control across frequency bands
  4. Crossover Filter - Linkwitz-Riley 4th order (configurable frequency)
  5. Phase & Time Alignment - Delay compensation for multi-way systems
  6. Brick-Wall Limiter - Peak protection and loudness maximization

Factory Presets

Default
Transparent passthrough (no processing)
Use Case: Reference monitoring
HiFi
Bookshelf/tower speakers
+1.5dB bass, +1.0dB highs, 40Hz crossover
Headphone
Studio/consumer headphones
+0.5dB bass, -1.0dB highs, balanced response
Studio
Professional monitors
+0.3dB bass, flat mids/highs, 35Hz crossover
Club
DJ/club systems
+4.0dB bass, +2.5dB highs, 100Hz crossover
Concert
Live PA systems
+3.0dB bass, -0.8dB mids, +2.0dB highs, 80Hz crossover

Auto-Calibration Features

Speaker Detection
Automatic analysis of speaker characteristics
Requires measurement microphone
Frequency Response
FFT-based spectrum measurement
20 Hz - 20 kHz analysis
Phase Alignment
Time-of-arrival detection
Compensates for multi-way speaker delays
Auto-EQ Correction
Automatic EQ calculation
Based on measured response

Usage Example

SmartMaster with Factory Preset
using OwnaudioNET.Effects.SmartMaster;

// Initialize SmartMaster
var smartMaster = new SmartMasterEffect();
smartMaster.Initialize(engine.Config);

// Option 1: Use factory preset
smartMaster.LoadSpeakerPreset(SpeakerType.HiFi);
smartMaster.Enabled = true;

// Apply to mixer output
mixer.AddMasterEffect(smartMaster);
SmartMaster with Auto-Calibration
// Option 2: Run auto-calibration (requires measurement microphone)
// Place microphone at primary listening position
await smartMaster.StartMeasurementAsync();

// Monitor progress
var status = smartMaster.GetMeasurementStatus();
Console.WriteLine($"Progress: {status.Progress * 100:F0}%");
Console.WriteLine($"Step: {status.CurrentStep}");

// Save calibrated settings
smartMaster.Save("my_listening_room");

// Load later
smartMaster.Load("my_listening_room");
Position-Dependent Optimization
The auto-calibration wizard measures the acoustic response at the microphone's location. The resulting calibration will optimize the sound specifically for that position in your room. For best results:
  • Place the measurement microphone at your primary listening position (e.g., your chair or desk)
  • Ensure the room is quiet during measurement
  • The calibrated system will sound best when you're at the same position as the microphone was during measurement
  • Different listening positions may require separate calibrations

Advanced Features

Subharmonic Synthesis: Generates harmonically-related low frequencies below the speaker's natural cutoff frequency, enhancing bass response on smaller systems without requiring larger drivers.

Phase Alignment: Automatically compensates for time-of-arrival differences between drivers in multi-way speaker systems (woofer vs. tweeter), ensuring coherent sound and proper imaging.

Adaptive Crossover: Linkwitz-Riley 4th order filters provide perfect reconstruction when summed, maintaining phase coherence across the crossover region for seamless frequency transitions.

Measurement Engine: Uses white noise test signals and FFT analysis to measure actual speaker response in your room, then calculates optimal EQ correction automatically to compensate for room acoustics and speaker characteristics.

Usage Examples

Basic Effect Usage

Single Effect
// Create source
var fileSource = new FileSource("audio.mp3");

// Wrap source with effects capability
var source = new SourceWithEffects(fileSource);

// Create and add effect with preset
var compressor = new CompressorEffect(CompressorPreset.VocalGentle);
source.AddEffect(compressor);

// Or create with custom parameters
var reverb = new ReverbEffect(
    size: 0.7f,
    damp: 0.5f,
    wet: 0.33f,
    dry: 0.67f,
    stereoWidth: 1.0f,
    mix: 0.5f
);
source.AddEffect(reverb);

// Control effect
compressor.Enabled = true;
compressor.Threshold = 0.6f;

// Add to mixer
mixer.AddSource(source);
mixer.Start();

Effect Chain

Multiple Effects in Series
// Create source and wrap with effects capability
var fileSource = new FileSource("guitar.wav");
var source = new SourceWithEffects(fileSource);

// Build effect chain in order
var compressor = new CompressorEffect(CompressorPreset.Default);
var eq = new EqualizerEffect(EqualizerPreset.Rock);
var chorus = new ChorusEffect(ChorusPreset.GuitarClassic);
var reverb = new ReverbEffect(ReverbPreset.Plate);
var limiter = new LimiterEffect(48000f, LimiterPreset.Mastering);

// Add in order (signal flows top to bottom)
source.AddEffect(compressor);  // 1. Control dynamics
source.AddEffect(eq);           // 2. Shape frequency
source.AddEffect(chorus);       // 3. Add movement
source.AddEffect(reverb);       // 4. Add space
source.AddEffect(limiter);      // 5. Final peak protection

mixer.AddSource(source);

Parallel Processing

Dry/Wet Parallel Chains
// Create two instances of same source
var dryFileSource = new FileSource("vocal.wav");
var wetFileSource = new FileSource("vocal.wav");

// Wrap wet source with effects
var wetSource = new SourceWithEffects(wetFileSource);

// Process wet chain only
var reverb = new ReverbEffect(ReverbPreset.Cathedral);
reverb.Mix = 1.0f;  // 100% wet
wetSource.AddEffect(reverb);

// Set levels for parallel blend
dryFileSource.Volume = 0.8f;  // 80% dry
wetSource.Volume = 0.2f;       // 20% wet

// Mix both
mixer.AddSource(dryFileSource);
mixer.AddSource(wetSource);

Dynamic Parameter Control

Real-time Parameter Automation
// Create source with effects
var fileSource = new FileSource("music.mp3");
var source = new SourceWithEffects(fileSource);

// Create and add effect
var flanger = new FlangerEffect(FlangerPreset.Classic);
source.AddEffect(flanger);

// Animate parameters
Task.Run(async () =>
{
    while (fileSource.State == AudioState.Playing)
    {
        // Sweep rate from 0.2 to 2.0 Hz
        float time = DateTime.Now.Ticks / 10000000.0f;
        float rate = 0.2f + (float)Math.Sin(time) * 0.9f + 0.9f;
        flanger.Rate = rate;

        await Task.Delay(50);
    }
});

Bypassing Effects

Toggle Effects On/Off
// Create source with effects
var fileSource = new FileSource("audio.mp3");
var source = new SourceWithEffects(fileSource);

// Add effects
var reverb = new ReverbEffect(ReverbPreset.Plate);
var chorus = new ChorusEffect(ChorusPreset.GuitarClassic);
source.AddEffect(reverb);
source.AddEffect(chorus);

// Toggle bypass
reverb.Enabled = false;  // Bypass (signal passes through)
reverb.Enabled = true;   // Re-enable

// Conditional processing
if (fileSource.Position > 30.0)
{
    // Enable effect after 30 seconds
    chorus.Enabled = true;
}

// Remove effect from chain
source.RemoveEffect(chorus);

Reading Effect State

Monitor Effect Status
// Check limiter activity
if (limiter.IsLimiting)
{
    float reduction = limiter.GetGainReductionDb();
    Console.WriteLine($"Limiter active: {reduction:F1}dB gain reduction");
}

// Read current gain from auto-gain
float currentGain = autoGain.CurrentGain;
float inputLevel = autoGain.InputLevel;
Console.WriteLine($"AutoGain: {currentGain:F2}x, Input: {inputLevel:F3}");

// Display effect info
Console.WriteLine(compressor.ToString());
// Output: "Compressor: Threshold=0.50, Ratio=4.0:1, Attack=100.0ms, Release=200.0ms, Enabled=True"

Best Practices

  • Effect Order: Dynamics → EQ → Modulation → Spatial → Limiter
  • CPU Usage: Reverb and 30-band EQ are most intensive
  • Latency: Limiter adds 1-20ms lookahead delay
  • Memory: Delay/Reverb use up to 4MB per instance
  • Thread Safety: Initialize effects before adding to source