Constant Q transform

Constant Q transform

In mathematics and signal processing, the Constant Q Transform transforms a data series to the frequency domain, and is related to the Fourier Transform [1].

The transform can be thought of as a series of logarithmically spaced filters, with the k-th filter having a spectral width some multiple of the previous filter's width, i.e.

\delta f_k = 2^{ \frac {1}{n} } * \delta f_{k-1}

Where we have n filters per octave of frequency. This recursive relationship can be rewritten as:

\delta f_k = \left ( {2^{ \frac {1}{n} }} \right ) ^{k} * \delta f_{min}

where fmin is the centre frequency of the first bin used.

Contents

Calculation of the Transform

The short-time Fourier Transform is calculated as follows:

X \left[ k \right] = \sum_{n=0}^{N-1} W[n] x[n] e^ { \frac{-j2 \pi kn}{N}}

Given a data series, sampled at f_s = \frac {1}{T}, T being the sampling period of our data, for each frequency bin we can define the following:

  • Filter width, δfk
  • Q, the "quality factor". This is shown below to be the integer number of cycles processed at a center frequency fk. As such, this somewhat defines the time complexity of the transform.

 Q = \frac{f_k}{\delta f_k}

  • Window length for the k-th bin

 N[k] = \left( \frac {f_s}{\delta f_k} \right) =  \left( \frac {S}{f_k} \right) Q

As  \frac {S}{f_k} is the number of samples processed per cycle at frequency fk, Q is the number of integer cycles processed at this center frequency.

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_s}{f_k}

  • The relative power of each bin will decrease with higher frequencies, as these sum over fewer terms. To compensate for this, we normalize by N[k].
  • Any windowing function will be a function of window length, and likewise a function of window number. For example, the equivalent Hamming window would be,

 W[k,n] = \alpha - \left(1 - \alpha \right) cos \left( \frac {2 \pi n}{N[k]} \right), 
 \alpha = 25/46 , 0 \leqslant n \leqslant N[k] - 1

  • Our digital frequency,  \frac {2 \pi k}{N} , becomes  \frac {2 \pi Q}{N[k]}

After these modifications, we are left with:

X \left[ k \right] = \frac {1}{N[k]} \sum_{n=0}^{N[k]-1} W[k,n] x[n] e^ { \frac{-j2 \pi Qn}{N[k]}}

Fast calculation using FFT

The direct calculation of the Constant Q transform is slow when compared against the Fast Fourier Transform (FFT). However, the FFT can itself be employed, in conjunction with the use of a kernel, to perform the equivalent calculation but much faster [2].

Comparison with the Fourier Transform

In general, the transform is well suited to musical data, and this can be seen in some of its advantages compared to the Fast Fourier Transform. As the output of the transform is effectively amplitude/phase against log frequency, fewer frequency bins are required to cover a given range effectively, and this proves useful where frequencies span several octaves. As the range of human hearing covers approximately ten octaves from 20 Hz to around 20 kHz, this reduction in output data is significant. The downside of this is a reduction in frequency resolution with higher frequency bins.

The transform mirrors the human auditory system, whereby at lower frequencies spectral resolution is better, whereas temporal resolution improves at higher frequencies, and so for musical data this is a reasonable trade off.

In addition, the harmonics of musical notes form a pattern characteristic of the timbre of the instrument in this transform. Assuming the same relative strengths of each harmonic, as the fundamental frequency changes, the relative position of these harmonics remains constant. This can make identification of instruments much easier.

Relative to the Fourier Transform, implementation of this transform is more tricky. This is due to the varying number of samples used in the calculation of each frequency bin, which also affects the length of any windowing function implemented.

Also note that because the frequency scale is logarithmic, there is no true zero-frequency / DC term present, perhaps limiting possible utility of the transform.

References

  1. ^ Judith C. Brown, Calculation of a constant Q spectral transform, J. Acoust. Soc. Am., 89(1):425–434, 1991.
  2. ^ Judith C. Brown and Miller S. Puckette, An efficient algorithm for the calculation of a constant Q transform, J. Acoust. Soc. Am., 92(5):2698–2701, 1992.

Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Transform fault — (the red lines) A transform fault or transform boundary, also known as conservative plate boundary since these faults neither create nor destroy lithosphere, is a type of fault whose relative motion is predominantly horizontal in either sinistral …   Wikipedia

  • Constant bitrate — (CBR) is a term used in telecommunications, relating to the quality of service. Compare with variable bitrate. When referring to codecs, constant bit rate encoding means that the rate at which a codec s output data should be consumed is constant …   Wikipedia

  • Fourier transform — Fourier transforms Continuous Fourier transform Fourier series Discrete Fourier transform Discrete time Fourier transform Related transforms The Fourier transform is a mathematical operation that decomposes a function into its constituent… …   Wikipedia

  • Weierstrass transform — In mathematics, the Weierstrass transform [Ahmed I. Zayed, Handbook of Function and Generalized Function Transformations , Chapter 18. CRC Press, 1996.] of a function f : R rarr; R is the function F defined by:F(x)=frac{1}{sqrt{4piint {… …   Wikipedia

  • Z-transform — In mathematics and signal processing, the Z transform converts a discrete time domain signal, which is a sequence of real or complex numbers, into a complex frequency domain representation. It is like a discrete equivalent of the Laplace… …   Wikipedia

  • Discrete Fourier transform — Fourier transforms Continuous Fourier transform Fourier series Discrete Fourier transform Discrete time Fourier transform Related transforms In mathematics, the discrete Fourier transform (DFT) is a specific kind of discrete transform, used in… …   Wikipedia

  • Laplace transform — In mathematics, the Laplace transform is one of the best known and most widely used integral transforms. It is commonly used to produce an easily soluble algebraic equation from an ordinary differential equation. It has many important… …   Wikipedia

  • Riesz transform — In the mathematical theory of harmonic analysis, the Riesz transforms are a family of generalizations of the Hilbert transform to Euclidean spaces of dimension d > 1. They are a type of singular integral operator, meaning that they are given by a …   Wikipedia

  • Continuous wavelet transform — of frequency breakdown signal. Used symlet with 5 vanishing moments. A continuous wavelet transform (CWT) is used to divide a continuous time function into wavelets. Unlike Fourier transform, the continuous wavelet transform possesses the ability …   Wikipedia

  • Integral transform — In mathematics, an integral transform is any transform T of the following form:: (Tf)(u) = int {t 1}^{t 2} K(t, u), f(t), dt.The input of this transform is a function f , and the output is another function Tf . An integral transform is a… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”