Constant-Q transform
In mathematics and signal processing, the constant-Q transform and variable-Q transform, simply known as CQT and VQT, transforms a data series to the frequency domain.[src] It is related to the Fourier transform and very closely related to the complex Morlet wavelet transform.[src] Its design is suited for musical representation.[src] of a C major piano chord.[src] The x-axis is frequency, mapped to standard musical pitches, from low (left) to high (right).[src] The y-axis is time, starting from pressing the piano chord at the bottom, and releasing the piano chord at the top, 8 seconds later.[src] Darker pixels correspond to higher values of the Constant-Q transform.[src] The peaks correspond closely to the precise frequencies of the vibrating piano strings.[src] Thus the peaks can be used to detect the notes played on the piano.[src] The lowest 3 peaks are the fundamental frequencies of the C major chord (C, E, G).[src] Each string also vibrates at multiples of the fundamental, known as overtones, which correspond to the remaining smaller peaks to the right of the fundamental pitches.[src] The overtones are smaller in intensity than the fundamental pitch.…[src]
In mathematics and signal processing, the constant-Q transform and variable-Q transform, simply known as CQT and VQT, transforms a data series to the frequency domain.[src] It is related to the Fourier transform and very closely related to the complex Morlet wavelet transform.[src] Its design is suited for musical representation.[src] of a C major piano chord.[src] The x-axis is frequency, mapped to standard musical pitches, from low (left) to high (right).[src] The y-axis is time, starting from pressing the piano chord at the bottom, and releasing the piano chord at the top, 8 seconds later.[src] Darker pixels correspond to higher values of the Constant-Q transform.[src] The peaks correspond closely to the precise frequencies of the vibrating piano strings.[src] Thus the peaks can be used to detect the notes played on the piano.[src] The lowest 3 peaks are the fundamental frequencies of the C major chord (C, E, G).[src] Each string also vibrates at multiples of the fundamental, known as overtones, which correspond to the remaining smaller peaks to the right of the fundamental pitches.[src] The overtones are smaller in intensity than the fundamental pitch.[src] ]] The transform can be thought of as a series of filters f k , logarithmically spaced in frequency, with the k-th filter having a spectral width δf k equal to a multiple of the previous filter's width: \delta f_k = 2^{1/n} \cdot \delta f_{k-1} = \left( 2^{1/n} \right)^k \cdot \delta f_\text{min}, where δf k is the bandwidth of the k-th filter, f min is the central frequency of the lowest filter, and n is the number of filters per octave.[src] X[k,m] = \sum_{n=0}^{N-1} W[n-m] x[n] e^{-j 2 \pi k n/N}.[src] Given a data series at sampling frequency f s = 1/T, T being the sampling period of our data, for each frequency bin we can define the following: Filter width, δf k .[src] Q, the "quality factor": Q = \frac{f_k}{\delta f_k}.[src] This is shown below to be the integer number of cycles processed at a center frequency f k .[src] As such, this somewhat defines the time complexity of the transform.[src] Window length for the k-th bin: N[k] = \frac{f_\text{s}}{\delta f_k} = \frac{f_\text{s}}{f_k} Q.[src] Since f s /f k is the number of samples processed per cycle at frequency f k , Q is the number of integer cycles processed at this central frequency.[src] The equivalent transform kernel can be found by using the following substitutions: The window length of each bin is now a function of the bin number: N = N[k] = Q \frac{f_\text{s}}{f_k}.[src] The relative power of each bin will decrease at higher frequencies, as these sum over fewer terms.[src] To compensate for this, we normalize by N[k].[src] Any windowing function will be a function of window length, and likewise a function of window number.[src] For example, the equivalent Hamming window would be W[k,n] = \alpha - (1 - \alpha) \cos \frac{2 \pi n}{N[k] - 1}, \quad \alpha = 25/46, \quad 0 \leqslant n \leqslant N[k] - 1.[src] Our digital frequency, \frac{2 \pi k}{N} , becomes \frac{2 \pi Q}{N[k]} .[src] After these modifications, we are left with X[k] = \frac{1}{N[k]} \sum_{n=0}^{N[k]-1} W[k,n] x[n] e^{\frac{-j2 \pi Qn}{N[k]}}.[src] \delta f_k = \left(\frac{2}{f_k + \gamma} \right) Q.[src] This formula can be modified to have extra parameters to adjust sharpness of the transition between constant-Q and constant-bandwidth like this: \delta f_k = \left(\frac{2}{\sqrt[\alpha]{f_k^\alpha + \gamma^\alpha}} \right) Q.[src] with α as a parameter for transition sharpness and where α of 2 is equals to hyperbolic sine frequency scale, in terms of frequency resolution.[src] ==Fast calculation== The direct calculation of the constant-Q transform (either using naive discrete Fourier transform or slightly faster Goertzel algorithm) is slow when compared against the fast Fourier transform.[src] However, the fast Fourier transform can itself be employed, in conjunction with the use of a kernel, to perform the equivalent calculation but much faster.[src] An approximate inverse to such an implementation was proposed in 2006; it works by going back to the discrete Fourier transform, and is only suitable for pitch instruments.[src] A development on this method with improved invertibility involves performing CQT (via fast Fourier transform) octave-by-octave, using lowpass filtered and downsampled results for consecutively lower pitches.[src] Implementations of this method include the MATLAB implementation and LibROSA's Python implementation.[src] LibROSA combines the subsampled method with the direct fast Fourier transform method (which it dubs "pseudo-CQT") by having the latter process higher frequencies as a whole.[src] The sliding discrete Fourier transform can be used for faster calculation of constant-Q transform, since the sliding discrete Fourier transform does not have to be linear-frequency spacing and same window size per bin.[src] Alternatively, the constant-Q transform can be approximated by using multiple fast Fourier transforms of different window sizes and/or sampling rate at different frequency ranges then stitch it together.[src] This is called multiresolution short-time Fourier transform, however the window sizes for multiresolution fast Fourier transforms are different per-octave, rather than per-bin.[src]
51 sentences · 51 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Constant-Q transform." encyclopegia.org, 2026, https://encyclopegia.org/wiki/constant-q-transform. Accessed 30 November 2026.
Chicago
"Constant-Q transform." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/constant-q-transform.
APA
encyclopegia.org. (2026). Constant-Q transform. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/constant-q-transform
Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON