Skip to main content

Module inverse

Module inverse 

Source
Expand description

Approximate inverse CQT: time-domain reconstruction from a CQT magnitude spectrogram (AU-CQT-STREAM).

This is an approximate, magnitude-only overlap-add reconstruction, not an exact inverse. A true inverse CQT requires the complex (phase-bearing) transform and a dual frame; here only per-bin magnitudes are available. We resynthesise each bin as a pure sinusoid at that bin’s centre frequency, scaled by its magnitude, and overlap-add the windowed frame contributions.

Phase is taken from the absolute output sample index n (not reset per frame), so overlapping frames add coherently and a steady tone reconstructs as a clean sinusoid at the bin centre frequency. Amplitude is only approximate (a Hann analysis-synthesis window is applied without gain-normalising the overlap), which is sufficient for pitch/frequency reconstruction but does not recover exact levels.

Caller-buffered: the reconstruction is written into out; no heap allocation is performed.

Functions§

inverse_cqt
Approximate inverse CQT via magnitude-weighted sinusoidal overlap-add.