Sound: To ConstantQLogFSpectrogram...

A command that creates a ConstantQLogFSpectrogram from a selected Sound.

Settings

Lowest frequency (Hz)
defines the lowest frequency about which information will be obtained. This frequency has to be chosen well above zero hertz (because of the logarithmic frequency scale there are an infinite number of octaves between any lowest frequency and zero hertz).
Maximum frequency (Hz)
The maximum frequency you are interested in. The default will be the Nyquist frequency of the sound.
Number of frequecy bins / octave
determines the frequency division as the number of frequency bins that will be used for each octave. For the analysis of music generally a multiple of 12 will be used.
Frequency resolution (bins)
determines, together with the number of frequency bins per octave, the quality factor used in the analysis.The quality factor Q of a filter is defined as its central frequency divided by its bandwidth. The bandwith of a filter, i.e its domain, will be be set as twice the frequency resolution in bins. Therefore, the corresponding quality factor will be:
qualityFactor = 1 / (2(frequencyResolutionBins / numberOfFrequencyBinsPerOctave) - 2(–frequencyResolutionBins / numberOfFrequencyBinsPerOctave)).
For a frequency resolution of 1 bin and a frequency division of 24 frequency bins per octave we get a quality factor of 14.26, for a frequency division of 48 bins per octave we get a quality factor of 34.6. The larger the quality factor the more frequency selective the filters will be and consequently, in the time domain, the longer their analysis window has to be. (Strictly speaking, the bandwidth of a filter is defined as the width of the filter at an intensity -3 dB below its top. The actual bandwidth depends on the form of the used filter function.)
Time oversampling factor
determines the number of frames in each frequency bin. Any number larger than 1 will increase the number of frames in a bin by approximately this factor.

Algorithm

The algorithm for constructing the invertable constant-Q transform is described in Velasco et al. (2011) and in Holighaus et al. (2013).

First the sound is transformed to the frequency domain with an FFT. The filtering is then performed in the frequency domain. For the kth frequency bin the frequencies between lowestFrequency·2(k-1)/numberOfFrequencyBinsPerOctave) and lowestFrequency·2(k+1)/numberOfFrequencyBinsPerOctave) are transformed back with an inverse FFT. The resulting coefficients are copied to the frames of the frequency bin. Because of the logarithmic frequency scale, the number of coefficients in a frequency bin will increase with bin number.


© djmw 20211111