Spectrogram π
License Required: The Spectrogram window requires a valid LinFIR license.
The Spectrogram visualises the time-frequency energy distribution of the impulse response as a 2-D colour map, making it easy to spot resonances, ringing, and temporal smearing that are difficult to see in a standard frequency response plot.
- Loudspeaker Design mode β shows the predicted sum impulse response for the currently selected angle (on-axis by default); when a non-zero angle is selected in the angle selector the spectrogram updates to reflect that off-axis response, and the window title shows the active angle (e.g. Spectrogram β Predicted Sum β +15Β°H +0Β°V)
- Room Calibration mode β shows the averaged measurement impulse response
Accessing the Spectrogram
Menu: View β Spectrogram
Keyboard shortcut: W

Layout
The window is divided into two panels:
- Main plot β the colour-mapped spectrogram
- Colorbar (right edge) β dB scale matching the current colormap range
A control bar above the plot exposes all parameters.
Controls
Transform Algorithm
Two algorithms are available, selectable via the CQT (Morlet) / STFT (Fourier) toggle buttons:
CQT β Constant-Q Transform (default)
Implemented as a frequency-domain Morlet (analytic Gaussian) filter bank:
- The IR is forward-FFTβd once into an analytic spectrum.
- For each log-spaced frequency fβ, the spectrum is multiplied by a Gaussian window of relative bandwidth 1/Q and inverse-FFTβd.
- The magnitude of the result is the instantaneous amplitude (envelope) at fβ.
This gives constant relative bandwidth β better frequency resolution at low frequencies and better time resolution at high frequencies β which matches the logarithmic frequency axis used throughout LinFIR.
STFT β Short-Time Fourier Transform
A Gaussian-windowed STFT (75% overlap) with linear frequency bins interpolated onto the log display grid. Provides uniform frequency resolution across the spectrum; the window size controls the time/frequency trade-off. The Gaussian window (Ο = 0.4 Β· N/2) offers very low spectral sidelobes, reducing frequency leakage.
Resolution Preset
A ComboBox selects the resolution preset for the active algorithm:
| Algorithm | Preset controls | Effect |
|---|---|---|
| CQT | Q factor (4 β 64) | Higher Q β sharper frequency bands, longer time smear |
| STFT | Window size in samples (128 β 32768) | Larger window β better frequency resolution, worse time resolution |
The timeβfrequency trade-off
Any time-frequency transform faces a fundamental constraint: you cannot simultaneously have perfect time resolution and perfect frequency resolution. Improving one always degrades the other. This is the acoustic equivalent of the Heisenberg uncertainty principle.
CQT Q factor
The Q factor defines the ratio of centre frequency to bandwidth for each analysis band:
$$Q = \frac{f_0}{\Delta f}$$
A band centred at \(f_0=1000, \text{Hz}\) with \(Q = 10\) has a bandwidth of \(\Delta f = 100,\text{Hz}\). The corresponding time resolution (temporal smear) is approximately:
$$\Delta t \approx \frac{Q}{f_0} = \frac{1}{\Delta f}$$
| Q | Frequency resolution | Time resolution | Typical use |
|---|---|---|---|
| 4 β 8 | Coarse | Sharp β short smear | Transient analysis, impact events |
| 12 β 24 | Moderate | Moderate | General loudspeaker IRs (default Q = 12) |
| 32 β 64 | Fine | Blurred β long smear | Resonance identification, room modes |
Because the CQT uses a constant relative bandwidth, low frequencies always have more time smear than high frequencies β this is physically correct and matches how we perceive sound.
STFT window size
The STFT divides the IR into short overlapping frames of fixed length N (in samples). Within each frame, the spectrum is computed with a uniform frequency resolution of \(\Delta f = f_s / N\):
$$\Delta t = \frac{N}{f_s}, \quad \Delta f = \frac{f_s}{N}$$
| Window | Ξf at 48 kHz | Ξt | Typical use |
|---|---|---|---|
| 128 β 512 | 375 β 94 Hz | 1 β 11 ms | Fast transients, HF detail |
| 1024 β 2048 | 47 β 23 Hz | 21 β 43 ms | Balanced (default) |
| 4096 β 8192 | 12 β 6 Hz | 85 β 170 ms | Fine frequency detail, room modes (default 8192) |
Unlike the CQT, the STFT resolution is the same at all frequencies β which can make low-frequency detail easier to read at the cost of poor high-frequency time resolution.
Colormap Range
| Control | Description |
|---|---|
| Min dB (drag-value) | Lower saturation β anything at or below this level renders as cold blue |
| Max dB (drag-value) | Upper saturation β anything at or above this level renders as hot red |
| Reset button | Restores min to β60 dB and max to 0 dB |
Narrowing the range highlights low-level detail (resonances, room modes, late decay). Widening it shows the full dynamic range at a glance.
Normalize (per-band)
The Normalize toggle scales each frequency band independently so that its peak amplitude equals 0 dB.
Without normalization, the colormap is referenced to the global maximum of the entire spectrogram β bands with inherently lower energy (e.g. very low or very high frequencies) may appear entirely blue even if they contain meaningful decay structure.
With normalization enabled:
- Every frequency band fills the full colormap range from its own peak (0 dB) down to the configured minimum.
- Decay tails, resonances, and room modes become visible across the entire frequency range regardless of the relative SPL of each band.
- The colormap controls (Min dB / Max dB) still apply β they define the dynamic range displayed within each normalized band.
Note: Normalize is a purely visual operation. It does not affect the underlying computation or the impulse response data.
Axis Swap
The Freq Γ Time / Time Γ Freq button swaps the horizontal and vertical axes:
- Time Γ Freq (default) β time on X (ms), frequency on Y (Hz, log)
- Freq Γ Time β frequency on X (Hz, log), time on Y (ms)
Swapping the axes resets the zoom to fit the new layout.
Plot Interaction
| Action | Effect |
|---|---|
| Drag | Pan |
| Scroll / pinch | Zoom |
| Box zoom (right-click drag) | Zoom to selection |
| Double-click | Reset to full view |
Interpreting the Spectrogram
The colour follows a rainbow-like gradient:
| Colour | Relative level |
|---|---|
| Red / yellow | High (near 0 dB β main energy) |
| Green | Mid-level |
| Blue | Low (well below 0 dB) |
What to look for:
- Narrow bright and straight red band β clean, impulse-like response; energy decays quickly at all frequencies
- Horizontal smearing at low frequencies β expected due to the longer wavelengths; the CQTβs time-smear is proportional to 1/f
- Persistent bright regions after t = 0 β cabinet resonances, port resonances, or room reflections; the frequency and decay time are directly readable from the plot
- Vertical stripes of colour in the axis-swapped view β resonant modes (a single frequency ringing for an extended time)
Pre-roll: The spectrogram always shows 200 ms before t = 0 (pre-padded with zeros). This prevents the CQT/STFT pre-ringing from being cropped and ensures the t = 0 onset is clearly visible.
Related Documentation
- Graph Interaction β zoom, pan, and detached windows
- Directivity Analysis β directivity sonogram and overlay plot
- License β license features and activation