Skip to content

Import microphone calibration files (.cal / factory .txt) #419

Description

@Skeyelab

Summary

Support loading microphone calibration files globally so frequency-dependent corrections apply across analysis widgets.

Motivation

Measurement mics often ship with factory cal files (e.g. serial-specific .txt with *1000Hz -38.6 sensitivity header + Hz/dB table). REW-style .cal files are also common. Today Friture only supports a scalar dB offset; cal file frequency data is unused.

Example factory file (24161.txt):

*1000Hz  -38.6
20.00  0.1
...
20000.00  2.5

Requirements

  • Load cal file from Settings → Input calibration (global, not per-dock)
  • Parse factory *1000Hz header format and REW-style .cal (freq/gain lines; optional sensitivity header)
  • Apply frequency correction globally to spectrum, octave, and spectrogram displays
  • Persist cal file path (and parsed data) in settings; reload on startup
  • Scalar SPL offset remains via existing global offset / Calibrate… workflow (interface gain still captured empirically unless we add preamp gain field later)

Out of scope (follow-ups)

  • Per-dock cal file override
  • Auto-computing dBFS offset from sensitivity without known interface gain
  • Phase correction from cal files

Test plan

  • Unit tests for cal file parser (factory + REW samples)
  • Test interpolated correction at known frequencies
  • Integration: spectrum/octave output shifts by file correction at a bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions