Constant Q Transform

Matlab code to calculate a constant Q transform by the "brute force method" as described in:

Brown, J.C., (1991). ``Calculation of a Constant Q Spectral Transform" J. Acoust. Soc. Am.  89,  425-434.

logftS.m calculates a transformation matrix using genlgkern.m and logft.m with input minimum and maximum frequencies and geometric spacing of the bins.

 logftS.m

 genlgftkern.m

logft.m

The transform can also be done as a single matrix multiplication with kerncos and kernsin from above and infile shaped by makmatrix.m.

T = kerncos + i * kernsin;
cqtrans = T * makmatrix( infile, windsiz, hopsiz);

A really inadequate inverse can be approximated using:

ilogftS.m

ilogft.m

ilogft2.m  (this is only useful for looking at a single input frame)

I'd love to hear about a decent inverse.