MzSpectrogramClient -- Demonstration of how to create spectral data from time data supplied by a host application.
The MzSpectrogramClient plugin accepts time-sequence audio data as input from the host application and applies a Fourier
transform to the data generate a spectrum. The plugin then
calculates and outputs the non-negative frequency magnitude
MzSpectrogramClient generates 1 output:
The MzSpectrogramClient plugin produces the same output as the MzSpectrogramHost plugin.
The difference between the two plugins is how the output is produced.
MzSpectrogramHost receives the pre-calculated complex frequency spectrum
from the host, while MzSpectrogramClient receives the time-based
audio signal from the host and then calculates the complex frequency
The MzSpectogramClient is a useful template for how to write your
own frequency analysis plugin where more control over the transform
process is necessary, or you want to implement a transform other than
a Discrete Fourier Transform, such as a wavelet transform.
Also, the analysis window applied to the audio signal in MzSpectrogramHost
is controlled by the host (usually selected by the user, or set to a
default type). If your plugin needs a specific analysis window which
cannot be supplied by the host, then you should use a client-based
transform as given in this example plugin.
While MzSpectrogramHost just calculates the magnitude spectrum
directly from the complex spectrum data sent by the host, MzSpectrogramClient
requires three prepatory steps to generate the spectrum
- Generate an analysis window (done once for all processing
in the initialise() function)
- Apply the analysis window on the input signal
- Apply the Fast Fourier Transform to the signal
Notice that the parameter list of the
makeMagnitudeSpectrum() function had to be changed from the
one in MzSpectrogramHost because the output of the
does not interleave the real and imaginary components of the complex
Also notice that the function
getInputDomain returns the value TimeDomain rather than FrequencyDomain
since the client plugin receives time data and will calculate its
own frequency domain data.
- MzSpectrogramHost --
demonstrates how to receive and process spectral data from
the host application.
- MzSpectrogramClient -- described on this page:
demonstrates how to generate and process spectral data generated
from time data provided by the host application.
- MzSpectrogramFFTW -- demonstrates how
to do three-to-four times faster Fourier transforms than MzSpectrgramClient.
- MzNevermore -- a full-featured
Spectrogram display function based on MzSpectrgramFFTW.