DEM AudioLinFIR Documentation
LinFIR

Calibration Processing


On this page

How LinFIR applies the measurement calibrations (soundcard, microphone, SPL) to a measurement, and how each correction is built. The calibrations are chosen in IR Management and managed in Measurement Calibration.


Order of Processing

Processing pipeline:

  1. Calibration corrections applied (if selected) to each measurement's impulse response, or to its spliced response - soundcard first, then microphone:
    • Soundcard: regularized inverse of the loopback response, timing preserved
    • Microphone: minimum-phase FIR filter created from frequency response data, sensitivity factor (dB) applied as gain adjustment, frequencies below 5 Hz filtered out before processing
  2. Measurement windowed (see Time Windowing)
  3. SPL calibration (if shown in dB SPL) applied as a gain to the measurements LinFIR captured, and the level offset to every measurement
  4. Corrected IR used for all subsequent filtering (crossovers, correction filters, etc.)

Phase behavior:

  • Microphone correction uses minimum-phase reconstruction, affecting both magnitude and phase - physically accurate for measurement microphones, which exhibit mainly minimum-phase behavior
  • Soundcard correction uses the interface's measured phase

Real-time updates:

  • Corrections are computed once per measurement and reused when you change the windowing parameters
  • Filter responses update automatically when you change the calibration selection

Microphone Correction

Minimum-phase correction: LinFIR converts the imported frequency response correction into a minimum-phase FIR filter applied during IR processing.

Processing steps:

  1. Frequency filtering: Bins below 5 Hz are removed to prevent phase distortion at very low frequencies
  2. Interpolation: Calibration data is interpolated to match your IR's sample rate and FFT size
  3. Minimum-phase conversion: Magnitude correction is converted to minimum-phase using Hilbert transform
  4. Sensitivity compensation: The sensitivity factor (dB) is applied as a gain adjustment
  5. IR application: The resulting correction filter is convolved with the driver's impulse response

Phase behavior: LinFIR does not use phase data from calibration files, even when present. Instead, the correction filter's phase is reconstructed from the magnitude response via the Hilbert transform (cepstral minimum-phase lifting). This is intentional:

  • Phase columns in calibration files are typically smoothed, wrapped, or quantized by the calibration software, and directly applying such data would introduce artifacts.
  • Measurement microphones exhibit predominantly minimum-phase behavior in their frequency response deviations, meaning the phase is largely determined by the magnitude — making reconstruction accurate without measured phase.

The resulting correction therefore affects both magnitude and phase of the measurement, with the phase derived from minimum-phase theory rather than read from the file.


Soundcard Correction

  • Applied to every measurement of the driver, on its impulse response (or its near-field / far-field spliced response) before the time window
  • Computed once per measurement and reused: changing the window or other settings doesn't recompute it
  • Harmonic distortion is analyzed on the uncorrected capture, since a correction would shift the harmonics' positions; the calibration is then applied as a gain to the fundamental and to each harmonic at its own frequency