WaveWarp 2.0 Component
      

Spectrum Analysers:
Functional Description
Real-time plot of the
spectrum of the
input audio signal, with built-in averaging and adjustable frequency and amplitude
scales. For stereo signals, the spectrum for
each channel is displayed in a separate plot. The spectral data can be exported
to a file for off-line analysis.
The spectrum analyser properties are adjusted via the Parameter Window, as summarised
in the following table.
| Parameter | Purpose |
| "Window length" slider |
Adjusts the length of the input data buffer used to compute each successive spectrum
measurement.
The FFT buffer size is computed from the "Window length"
rounded up to the nearest power of 2
(for efficient FFT computation). If "double-padding" is selected, the FFT buffer size is
doubled (after the rounding) to improve the smoothness of the spectrum between successive
FFT bins (but without increasing the underlying frequency resolution).
The input data buffer
is windowed (using a selected profile), then
extended to the length of the FFT buffer by
padding with zeros (on either side).
|
| "Lower frequency" slider |
Adjusts the
lower frequency limit of the spectrum plot.
The "Reset" button restores
the default setting.
The plot is updated whenever the FFT buffer is re-filled. The time elapsed between
successive
updates is displayed as the "Refresh period".
The number of FFT bins within the selected plot frequency range
is also displayed.
|
| "Upper frequency" slider |
Adjusts the
upper frequency limit of the spectrum plot.
The "Reset" button restores
the default setting.
|
| "Y-scale" slider |
Adjusts the amplitude scale of the spectrum plot.
The amplitude is scaled naturally, i.e. corresponds to the
actual rms value of the signal. (For example, a pure sine wave with an amplitude of 1,
will have a single spike in its spectrum , with an rms amplitude of 0.707 (un-windowed)).
If "dB scale" is selected in the plot window,
the plotted quantity (per frequency point) is
A dB = 20 log10 A,
where A is the rms amplitude.
The "Reset" button restores
the default setting for the amplitude plot-scale.
|
| "Averaging" slider |
Adjusts the averaging time for the spectrum computation and display.
|
| "Window type" selection |
Selects the profile of the windowing function applied to the input data.
|
| "Freeze/Unfreeze" button |
Freeze-frame toggle control. When the plot has been frozen, it is not updated again until it has
been unfrozen (even after the "stop" button has been pressed).
|
| "Save average spectrum to file" dialog |
Exports the current averaged spectrum measurement to an ASCII file
for off-line analysis. For stereo signals, the average spectrum (across the channels) is saved.
The ASCII file format for storing complex-valued spectra is
described in the
WaveWarp Users' Guide.
Note: for
MATLAB®
users, the measured spectra can be imported into MATLAB
in a straightforward manner.
The "wwmatlab" sub-directory of the WaveWarp root directory contains
the necessary function m-files (plus example scripts) for
doing so,
thereby providing ready access to
MATLAB's powerful mathematical tools for
off-line analysis of the measured spectrum.
(Refer to the
WaveWarp Users' Guide
for
a summary of all bundled m-files for working with MATLAB
in a variety of areas in addition to spectral analysis).
|
Algorithm
Each successive input buffer
is transformed
to the frequency domain using the windowed-FFT.
Spectral averaging is performed point-by-point in the frequency domain using a
first-order low-pass filter.
For an introduction to the Discrete Fourier Transform and the FFT,
see, for example,
[St] sections 4.1 and 4.2.
For further introductory information (with emphasis on audio applications), and
for discussions on spectral measurements, zero-padding,
windowing,
and the Short Time Fourier Transform (STFT) for audio applications,
see
[Roa] p. 1084-1112
and
[Moore] p. 61-111.
Signal Implementations
| Audio signals | Control signals | Description |
| Single input mono | n/a | Computes and displays (in real-time) the spectrum of the mono input |
| Single input stereo | n/a | Computes and displays (in real-time) the spectrum of the stereo input, with a separate plot per channel |
Related components:
Example DrawingBoards illustrating usage:

      
|