DEM AudioLinFIR Documentation
LinFIR

Spectrogram Transforms


On this page

A spectrogram shows how the energy of an impulse response is spread in time and frequency. No transform can be sharp in both at once (the time/frequency trade-off of the Kaiser Window page): each of LinFIR's four transforms shares it out differently. This page explains how each one is computed; the controls are described in Spectrogram.


CQT: Constant-Q Transform

Implemented as a frequency-domain Morlet (analytic Gaussian) filter bank:

  1. The IR is forward-FFT'd once into an analytic spectrum.
  2. For each log-spaced frequency f₀, the spectrum is multiplied by a Gaussian window of relative bandwidth 1/Q and inverse-FFT'd.
  3. The magnitude of the result is the instantaneous amplitude (envelope) at f₀.

This gives constant relative bandwidth: each band is the same fraction of an octave wide, so the frequency resolution is finer at low frequencies and the time resolution finer at high frequencies.


STFT: Short-Time Fourier Transform

The impulse response is cut into overlapping windowed segments (75% overlap), each transformed with an FFT. The frequency bins are evenly spaced in hertz, then interpolated onto the logarithmic display grid: the frequency resolution is the same everywhere, set by the window length, coarse in the bass on a logarithmic axis.


CSD: Cumulative Spectral Decay

The impulse response progressively truncated from the front: for each of a series of gate positions the IR from that point to the end is transformed, so each slice is the spectrum of the whole remaining tail (only the front of the window moves — a true cumulative decay). The gate's leading edge is Blackman-Harris tapered, so that moving it does not add a click of its own.


Burst Decay

The same Morlet filter bank as the CQT, but each band's decay is read on a period-based time axis (t·f): a resonance that rings for N cycles looks the same at every frequency, so resonances can be compared wherever they sit, as we hear them (Fryer & Toole).


The End of the Measurement

All four transforms get a 1 ms raised-cosine fade-out on the end of the impulse response first, so the hard cut where the measurement stops doesn't smear a broadband click across the last millisecond of the plot.