IIR Constant-Q Transform


Here you can find some information and the Matlab/Octave source code of the IIR Constant-Q Transform (IIR-CQT) proposed in the article "AN EFFICIENT MULTI-RESOLUTION SPECTRAL TRANSFORM FOR MUSIC ANALYSIS", P. Cancela, M. Rocamora, E. Lopez, ISMIR 2009.

It shows to be a good compromise between the flexibility of the efficient CQT and the low computational cost of the MR-FFT.


The spectrum of the signal frame x is filtered using an IIR filter of one zero and one pole. This corresponds to a multiplication in the time domain between the signal frame and a window being the frequency response of the IIR filter. The zero is located at -1 in the Z-plane to force a time window that is zero in its extremes. The location of the pole varies for each frequency bin along the real axis in order to obtain different time window widths (typically wider for lower frequencies and narrower for higher ones), giving the multi-resolution behavior of the transform. Thus the filter is an IIR Linear Time Variant.
The recursive equation of the filter is: y[n]=x[n]+x[n+1]+poles[n]*y[n-1]
The filter is applied in forward direction followed by reverse filtering to obtain zero-phase distortion (and magnitude modified by the square of the filter's magnitude response). A detailed explanation can be found in the article.

The source code is available here


The following examples show the difference between IIR-CQT and traditional STFT spectrograms.

(click to enlarge)