Ohmic Audio Labs Knowledge Base

12.6 Advanced DSP — FIR Filters and Room Correction

🔰 BEGINNER LEVEL: Dirac Live and What It Does

What Automated Room Correction Actually Fixes

Dirac Live (and similar correction algorithms like Audyssey, MCACC) automates the measurement and correction process. You place a microphone at multiple positions, the software plays test signals, measures the acoustic response, and computes correction filters automatically.

What Dirac improves:

Illustration note: Split frequency response and impulse response before/after Dirac correction

What Dirac cannot fix:

Hardware Requirements for Dirac

Dirac Live is available on specific hardware platforms:

Dirac requires a calibrated measurement microphone (included with the C-DSP 8×12 DL), a laptop running the Dirac Live application, and a USB connection to the DSP.

🔧 INSTALLER LEVEL: Dirac Live Measurement Procedure

Measurement Setup

Microphone placement:

Dirac recommends 9 measurement positions around the primary listening position. Positions should be: - Within 18 inches of the ear position - Varied in height and angle (not all at exact ear height) - Include some off-axis positions (±15° from center)

Environment:

Measurement process:

  1. Connect UMIK-1 to laptop
  2. Open Dirac Live application
  3. Enter room/vehicle information
  4. Follow measurement wizard: 9 positions, each plays test sweep
  5. Dirac processes all measurements (2–5 minutes)
  6. Review proposed correction curve
  7. Adjust target curve if desired (bass extension, treble tilt)
  8. Export filters to DSP

Interpreting and Adjusting the Target Curve

Dirac's default target curve may not match the Harman automotive target. After generating corrections, compare the target to the Harman curve and adjust:

⚙️ ENGINEER LEVEL: FIR Filter Mathematics

Linear Phase FIR Filter Design

A linear-phase FIR filter of length N has coefficients h[n] that are symmetric:

h[n] = h[N−1−n]

This symmetry forces the phase response to be exactly linear (constant group delay = (N−1)/2 samples).

Frequency response:

H(e^jω) = Σ h[n] × e^(-jωn)    for n = 0 to N-1

For a lowpass filter with cutoff ωc:

Ideal (infinite) impulse response:

h_ideal[n] = ωc/π × sinc(ωc(n − N/2) / π)

Windowing:

Truncating to N samples creates spectral leakage. Apply a window function:

h[n] = h_ideal[n] × w[n]

Window types and performance:

Window Transition BW Sidelobe attenuation
Rectangular Narrowest −13 dB (poor)
Hann Medium −44 dB
Blackman Wide −74 dB
Kaiser (β=10) Wide −100 dB

Parks-McClellan (Equiripple) design:

The optimal equiripple FIR achieves the minimum filter length for a given specification. The filter coefficients are found via the Remez exchange algorithm.

For car audio DSP work: miniDSP Studio allows importing custom FIR coefficients. Design filters in MATLAB, Python (scipy.signal.remez), or free tools like FIR Designer M. Export coefficients as text file, import to DSP.

Filter length vs frequency resolution:

Δf = fs / N    [frequency resolution in Hz]

For 48 kHz sample rate, N = 4096:

Δf = 48000 / 4096 = 11.7 Hz

A 4096-tap FIR resolves frequency features down to 11.7 Hz — more than adequate for audio work.

Latency:

Latency = N / (2 × fs) = 4096 / (2 × 48000) = 42.7 ms

All non-FIR channels must be delayed by this same amount to maintain inter-channel coherence. A system using FIR on some channels and IIR on others must apply 42.7ms of additional IIR delay to the IIR channels.