Class CompressorExpanderAudioEffect
- Namespace
- VisioForge.Core.Types.X.AudioEffects
- Assembly
- VisioForge.Core.dll
Compressor/expander effect for dynamic range control of audio signals. Uses the GStreamer 'audiodynamic' element to compress loud signals or expand quiet signals. Essential for broadcast, mastering, and controlling audio dynamics.
public class CompressorExpanderAudioEffect : BaseAudioEffect, ISharedAudioEffectX, IVideoEditXAudioEffectInheritance
Implements
Inherited Members
Remarks
GStreamer element: audiodynamic Properties:
- mode: 0=Compressor (reduce dynamic range), 1=Expander (increase dynamic range)
- characteristics: 0=Hard knee (abrupt), 1=Soft knee (gradual)
- ratio: Compression/expansion ratio
- threshold: Signal level where effect begins (0.0 to 1.0)
Compressor mode:
- Reduces the volume of loud signals above the threshold
- Ratio determines how much: 2:1 (gentle) to 10:1 (limiting)
- Used for: Leveling vocals, controlling peaks, mastering
Expander mode:
- Reduces the volume of quiet signals below the threshold
- Can act as a noise gate at high ratios
- Used for: Noise reduction, transient enhancement
Hard knee vs Soft knee:
- Hard knee: Abrupt transition at threshold (more aggressive)
- Soft knee: Gradual transition (more musical, natural)
Constructors
CompressorExpanderAudioEffect()
Initializes a new instance of the VisioForge.Core.Types.X.AudioEffects.CompressorExpanderAudioEffect class. Creates a compressor with default soft-knee characteristics.
public CompressorExpanderAudioEffect()Properties
Characteristics
Gets or sets the knee characteristics determining how the effect transitions at the threshold. Hard knee provides immediate, aggressive action at the threshold. Soft knee provides gradual, more musical transition around the threshold.
public AudioDynamicCharacteristics Characteristics { get; set; }Property Value
Mode
Gets or sets the operating mode. Compressor mode: Reduces volume of signals above threshold (decreases dynamic range). Expander mode: Reduces volume of signals below threshold (increases dynamic range).
public AudioCompressorMode Mode { get; set; }Property Value
Ratio
Gets or sets the compression or expansion ratio.
In Compressor mode:
- 1:1 = no compression (bypass)
- 2:1 = gentle compression (musical, transparent)
- 4:1 = moderate compression (typical for vocals, instruments)
- 6:1-10:1 = heavy compression (limiting, broadcast)
- 20:1+ = brick-wall limiting
In Expander mode:
- 1:1 = no expansion (bypass)
- 2:1 = gentle expansion
- 4:1+ = stronger expansion (approaching gate behavior)
- 10:1+ = hard gating (noise gate)
Higher ratios produce more dramatic effects.
public double Ratio { get; set; }Property Value
Threshold
Gets or sets the threshold level where the compressor/expander begins to act. Signals above this level (compressor) or below this level (expander) are processed. Range: 0.0 (lowest) to 1.0 (highest). Default: 0.0.
Setting guidelines:
- 0.0-0.3: Affects very quiet to moderate signals
- 0.3-0.6: Affects moderate to loud signals (typical for compression)
- 0.6-0.9: Affects only loud signals (peak limiting)
For compressors: Lower threshold = more signal is compressed For expanders: Higher threshold = more signal is expanded/gated
public double Threshold { get; set; }Property Value
Methods
GenerateDescription()
Generates the description.
public string GenerateDescription()Returns
- string
-
A string representation of the audio effect parameters.