Examples in Matlab and Octave
Matlab for Computing Spectrograms
Non-Parametric Frequency WarpingSearch Spectral Audio Signal Processing
Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?
There are many applications in which it is desirable to obtain spectra which are nonuniformly sampled in frequency. Since the FFT is so fast, it is often most efficient to first compute a uniformly sampled spectrum using the FFT, and then resample the spectrum nonuniformly to obtain the desired nonuniformly spaced samples. In general, some smoothing is necessary prior to the resampling, since we can only decrease spectral resolution by resampling.
In other terms, the uniform frequency grid of the FFT may be converted to a non-uniform frequency grid by means of bandlimited interpolation (Chapter 4). The lowpass filter integral to proper downsampling provides the needed smoothing.
As an example, when synthesizing an auditory filter bank from one or more FFT outputs (discussed in §6.3), the smoothing filter (interpolation kernel) is taken to be a frequency-dependent, level-dependent auditory filter frequency response.
Another application is frequency warping, in which it is desired to warp the frequency axis according to some function. For example, it is possible warp the spectra of signals in a manner similar to the frequency warping used by wave digital filters, or other filters designed by the bilinear transform (Appendix E).
This ``nonparametric'' spectral warping method has been used successfully for general purpose digital filter design over an approximate psychoacoustic frequency scale [236,235]. It has the advantage that it is not limited to any specific functional form, such as the bilinear transform, for frequency warping. This generality is useful when carefully matching the resolution of human hearing in a spectral display.
Care must be taken with respect to the time-domain step-size, since smoothing (convolution) in the frequency domain corresponds to windowing in the time domain. When a short-time spectrum is smoothed along its frequency axis, its time-domain window is effectively shortened. As a result, the original STFT needs to be oversampled in time in preparation for such frequency-domain smoothing. Otherwise, time-domain data will be nonuniformly represented in the resulting analysis.
