|
|
Line 1: |
Line 1: |
| In mathematics and [[signal processing]], the '''Constant Q Transform''' transforms a data series to the frequency domain. It is related to the [[Fourier Transform]],<ref name="b91">Judith C. Brown, [http://www.wellesley.edu/Physics/brown/pubs/cq1stPaper.pdf Calculation of a constant Q spectral transform], ''J. Acoust. Soc. Am.'', 89(1):425–434, 1991.</ref> and very closely related to the complex [[Morlet wavelet]] transform.<ref>[https://ccrma.stanford.edu/~jos/sasp/Continuous_Wavelet_Transform.html Continuous Wavelet Transform] "When the mother wavelet can be interpreted as a windowed sinusoid (such as the Morlet wavelet), the wavelet transform can be interpreted as a constant-Q Fourier transform. Before the theory of wavelets, constant-Q Fourier transforms (such as obtained from a classic third-octave filter bank) were not easy to invert, because the basis signals were not orthogonal."</ref>
| | Hi there, I am Felicidad Oquendo. Bookkeeping is what he does. To play badminton is something he truly enjoys performing. I currently live in Arizona but now I'm considering other options.<br><br>My webpage extended auto warranty ([http://www.skyperoom.com/blogs/post/9816 navigate to this site]) |
| | |
| 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.
| |
| | |
| <math>\begin{align}
| |
| \delta f_k &= 2^{ \frac {1}{n} } * \delta f_{k-1}
| |
| \\ &= \left ( {2^{ \frac {1}{n} }} \right )^{k} * \delta f_{\mathrm{min}}
| |
| \end{align}</math>
| |
| | |
| where δ''f<sub>k</sub>'' is the bandwidth of the kth filter, ''f''<sub>min</sub> is the centre frequency of the lowest filter, and ''n'' is the number of filters per [[octave (electronics)|octave]].
| |
| | |
| == Calculation of the Transform ==
| |
| | |
| The short-time Fourier Transform is calculated as follows:
| |
| | |
| :<math>X \left[ k \right] = \sum_{n=0}^{N-1} W[n] x[n] e^ { \frac{-j2 \pi kn}{N}} </math>
| |
| | |
| Given a data series, sampled at ''f<sub>s</sub>'' = 1/''T'', ''T'' being the sampling period of our data, for each frequency bin we can define the following:
| |
| | |
| * Filter width, δ''f<sub>k</sub>''
| |
| | |
| * ''Q'', the "quality factor". This is shown below to be the integer number of cycles processed at a center frequency ''f<sub>k</sub>''. As such, this somewhat defines the time complexity of the transform.
| |
| | |
| ::<math> Q = \frac{f_k}{\delta f_k}</math>
| |
| | |
| * Window length for the ''k''-th bin
| |
| | |
| ::<math> N[k] = \left( \frac {f_s}{\delta f_k} \right) = \left( \frac {S}{f_k} \right) Q </math>
| |
| | |
| :As ''S''/''f<sub>k</sub>'' is the number of samples processed per cycle at frequency ''f<sub>k</sub>'', ''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:
| |
| ::<math>N = N[k] = Q \frac {f_s}{f_k}</math>
| |
| | |
| * 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,
| |
| ::<math> 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</math>
| |
| | |
| * Our digital frequency, <math> \frac {2 \pi k}{N} </math>, becomes <math> \frac {2 \pi Q}{N[k]} </math>
| |
| | |
| After these modifications, we are left with:
| |
| | |
| :<math>X[k] = \frac {1}{N[k]} \sum_{n=0}^{N[k]-1} W[k,n] x[n] e^{\frac{-j2 \pi Qn}{N[k]}} </math>
| |
| | |
| ==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 (statistics)|kernel]], to perform the equivalent calculation but much faster.<ref name="pb92">Judith C. Brown and Miller S. Puckette, [http://academics.wellesley.edu/Physics/brown/pubs/effalgV92P2698-P2701.pdf An efficient algorithm for the calculation of a constant Q transform], ''J. Acoust. Soc. Am.'', 92(5):2698–2701, 1992.</ref>
| |
| | |
| == 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 ==
| |
| <references/>
| |
| | |
| {{DEFAULTSORT:Constant Q Transform}}
| |
| [[Category:Integral transforms]]
| |
| [[Category:Harmonic analysis]]
| |
Hi there, I am Felicidad Oquendo. Bookkeeping is what he does. To play badminton is something he truly enjoys performing. I currently live in Arizona but now I'm considering other options.
My webpage extended auto warranty (navigate to this site)