SV Mazurka Plugin:
MzSpectrogramHost          

SYNOPSIS

    MzSpectrogramHost -- Demonstration of how to process spectral data from host applications.
    The MzSpectrogramHost plugin demonstrates how to process frequency blocks provided by the host application when the polymorphic function getInputDomain() returns the value FrequencyDomain.

OUTPUTS

    MzSpectrogramHost generates 1 output:

    1.

DESCRIPTION

    The frequency bins provided by the host application are interleaved pairs of numbers representing the complex values of the spectrum. The even indexed values are the real components of the spectrum and the odd indexed values are the imaginary components. Negative frequency bins are found in the top of the input data array. The following figure shows the basic schematic for the input frequency spectrum.

    MzSpectrogramHost takes this complex spectrum data and calculates the magnitude spectrum in the non-interface function called makeMagnitudeSpectrum(). Note that only the positive magnitude spectrum is being calculated, since the source waveform is expected to be real-valued. The magnitude spectrum of the negative frequencies is a mirror image of the onse for positive frequencies, and therefore does not have any new information about the signal.

    The following figure shows three panes from Sonic Visualiser. The top pane displays the waveform of the audio. The second pane displays the magnitude spectrum (zoomed from 0 to 1000 Hz) which was created by MzSpectrogramHost; and the final pane shows the same spectrogram output generated internally in Sonic Visualiser.


                                         Click here to listen to the corresponding sound

DOWNLOAD

    Compiled versions of the MzSpectrogramHost plugin can be downloaded from the download page.

    The source code for the plugin was last modified on 21 Jun 2006.

SEE ALSO

    In order of complexity:
    1. MzSpectrogramHost -- described on this page: demonstrates how to receive and process spectral data from the host application.
    2. MzSpectrogramClient -- demonstrates how to generate and process spectral data generated from time data provided by the host application.
    3. MzSpectrogramFFTW -- demonstrates how to do three-to-four times faster Fourier transforms than MzSpectrgramClient.
    4. MzNevermore -- a full-featured Spectrogram display function based on MzSpectrgramFFTW.