Introduction

   The namespace CLAM::VM offers a set of classes to view the data contained CLAM's 
ProcessingData. Various tools are available which allow the user to visually check 
Audio, Spectrum, and other objects.

   This set of classes has been implemented using Trolltech’s Qt toolkit. These widgets 
can be integrated into other Qt applications, or they can use plots independently through 
DirectPlots. DirectPlots allows the viewing of one specific plot, and until the window 
containing the plot is closed, no other plots can be viewed.  If you wish to view a set
of plots simultaneously, the classes PlotFactory and QtPlotter are available.

   This set of widgets are in the intial development phase, and we hope to continue 
increasing and refining the number of plots actually available.In this initial
development stage, the following displays are available:
  • QtAudioPlot - for viewing audio data
  • QtSegAudioPlot - fow vieweing audio data with segmentation marks.
  • QtSpectrumPlot - for viewing spectra.
  • QtSpectrumAndPeaksPlot - for viewing the spectrum with spectral peaks.
  • QtFundFreqPlot - for viewing the fundamental frequency.
  • QtSinTracksPlot - for viewing sinusoidal tracks.
   This document focuses on showing how to use this set of widgets to view data.  
As such, the sections relative to each class only mention methods useful directly 
to the user. Specifications for private and protected methods are not discussed. 
Similarly, only the 'productive' classes are shown. The other types of classes are not 
discussed in this document even though they form part of the system as the user does 
not need to make use of them directly.

   Use of the plots is fairly simple. If you are looking for a quick view of the data 
for feedback during debugging, it is best to use DirectPlots or QtPlotter.
QtPlots
   The QtPlots are real widgets and can be integrated into a user's own Qt application.

DirectPlots
   Viewing audio data with a DirectPlot could be done as follows:

#include "DPAudio.hxx"

int main()
{
    CLAM::Audio audio;
    // get audio data
    CLAM::VM::PlotAudio(audio);
    Return 0;
}

// END

   This call to the function Plot(...) will show an unlabelled widget with default 
geometry. The functions for viewing the plots directly share a similar syntax, changing
only the type of data to be viewed. For example, if you wanted to view the fundamental 
frequency data, the previous main would be:

#include "DPFundamental.hxx"

int main()
{
	CLAM::Segment segment;
	// get F0
	CLAM::VM::PlotFundamental(segment);
	Return 0;
}

// END


QtPlotter
   QtPotter is available if you wish to have a view of a series of plots simultaneously.
The plots are obtained by using PlotFactory. If you want to view an audio signal, its F0 
evolution and sinusoidal tracks, you could procede as follows:

#include "PlotFactory.hxx"
#include "QtPlotter.hxx"

using CLAM::VM::PlotFactory;
using CLAM::VM::QtPlotter;
using CLAM::VM::QtAudioPlot,
using CLAM::VM::QtFundFreqPlot,
using CLAM::VM::QtSinTracksPlot;

int main()
{
	CLAM::Segment seg;

	// process data

	QtAudioPlot* aPlot = PlotFactory::GetAudioPlot(seg.GetAudio(),"Audio");
	QtFundFreqPlot* fPlot = PlotFactory::GetFundFreqPlot(seg,"Fundamental",0,250);
	QtSinTracksPlot* sPlot = PlotFactory::GetSinTracksPlot(seg,"Sinusoidal Tracks",0,500);

	QtPlotter::Add(aPlot);
	QtPlotter::Add(fPlot);
	QtPlotter::Add(sPlot);

	QtPlotter::ShowAll();

	return 0
}

// END

The syntax for obtaining plots using PlotFactory is similar to that used in DirectPlots.

For compiling and linking programs using QTVM qwt external library are required. Qwt provides
a set of classes which are useful for programs with a technical background.