Skip to content

DSP Architecture

Quetschwalze edited this page Dec 24, 2025 · 1 revision

This page outlines the signal processing flow used in the Upmixer to convert 2-channel Stereo into 5.1/7.1 Surround.

Signal Flow Overview

The upmixing process is divided into three main stages:

  1. Analysis & Decomposition
  2. Spatial Distribution (Matrixing)
  3. LFE Extraction

1. Analysis (L/R Decomposition)

The algorithm analyzes the relationship between the Left (L) and Right (R) input channels to separate "Direct" sounds from "Ambient" sounds.

  • Direct Sound (Center): Extracted from the correlated signal (L + R). This represents the phantom center.
  • Ambient Sound (Surround): Extracted from the uncorrelated signal (L - R). This represents spatial information.

2. Spatial Distribution

Based on the decomposition, signals are routed to the target channels:

  • Front L/R: Contains the original stereo signal minus the extracted Center portion (controlled by Divergence).
  • Center (C): The correlated mono sum.
  • Surrounds (Ls/Rs): The uncorrelated difference signal is processed with:
    • Delay: Small delay (10-20ms) to enhance the Haas effect (precedence effect).
    • Filtering: Gentle low-pass or shelving to simulate distance.
  • Rears (Lrs/Rrs - 7.1 only): Derived from the Surround channels with additional decorrelation.

3. LFE Extraction (Subwoofer)

The Low Frequency Effects channel is generated via a crossover network:

  • Input: Sum of L + R.
  • Filter: 4th-order Linkwitz-Riley Low-Pass Filter (variable cutoff, default 120Hz).
  • The resulting signal is routed exclusively to the LFE output (Channel 4 in 5.1 layout).

Implementation Details

  • Block Processing: Audio is processed in blocks (buffer size determined by host).
  • Zero Latency: The core matrixing is zero-latency.
  • Smoothing: All user parameters (Width, Gain, etc.) are smoothed using juce::SmoothedValue to prevent zipper noise during automation.

Clone this wiki locally