Module separation

Module separation 

Source
Expand description

Direct/ambience signal separation algorithm.

This module implements the coherence-based separation of direct sound from room ambience using inter-bin phase analysis.

§Algorithm Overview

The separation is based on the observation that:

  • Direct sound has coherent phase relationships between neighboring frequency bins (the phase progression follows a predictable pattern related to time-of-arrival)
  • Ambience/reverb has random, diffuse phase relationships

We use multiple cues:

  1. Inter-bin phase coherence: Direct sound shows correlated phase between neighbors
  2. Spectral flux: Transients (direct attacks) have higher positive flux
  3. Temporal stability: Ambience is more temporally stable
  4. Magnitude correlation: Direct sound often shows correlated magnitude envelopes

Structs§

CoherenceAnalyzer
Coherence analyzer for bin-to-bin relationships.
SeparationConfig
Configuration for signal separation.
SignalSeparator
Signal separator that applies the coherence analysis to split signals.
StereoSeparator
Stereo separation for maintaining spatial information.