Public Member Functions | Static Public Attributes

pav::lib::visualizer::Spectrum Class Reference

List of all members.

Public Member Functions

 Spectrum ()
void process () throws PAVException
void setCutoffFrequencies (int min, int max)
void noCutoffFrequencies ()
void setMode (int mode)
void rememberMax (boolean remember)
String toString ()
void dispose ()

Static Public Attributes

static final int MODE_BINS = 1
static final int MODE_DOTS = 2
static final int MODE_SHAPE = 3

Detailed Description

Draws the logarithm of the frequency spectrum of the currently playing audio data.

Author:
christopher

Constructor & Destructor Documentation

pav::lib::visualizer::Spectrum::Spectrum (  )  [inline]

Ctor.


Member Function Documentation

void pav::lib::visualizer::Spectrum::dispose (  )  [inline]

Disposes this visualizer, releasing all resources that were used exclusively by this visualiter. Subsequent calls to any methods of the visualizer might cause exceptions.

Implements pav::lib::visualizer::Visualizer.

void pav::lib::visualizer::Spectrum::noCutoffFrequencies (  )  [inline]

Tells the visualizer not to use cutoff frequencies. See cutoffFrequencies().

void pav::lib::visualizer::Spectrum::process (  )  throws PAVException [inline]

Draws to the PApplet specified by drawTo.

Exceptions:
PAVException If an error occures while drawing

Implements pav::lib::visualizer::Visualizer.

void pav::lib::visualizer::Spectrum::rememberMax ( boolean  remember  )  [inline]

Before drawing the maximum intensity of the frequency data is calculated so that the output can be scaled properly. This method sets whether the maximum will be saved and reused.

Parameters:
remember Whether to remember the max intensity
void pav::lib::visualizer::Spectrum::setCutoffFrequencies ( int  min,
int  max 
) [inline]

Sets the cutoff frequencies. This will cut all frequency bands with lower frequencies, the first used band will be the one with the frequency min in it. The same counts for max. This means that the cutoff is not very precise.

Parameters:
min The minimum frequency. Must be >= 0
max The maximum frequency. Must be <= 22050 and > min
void pav::lib::visualizer::Spectrum::setMode ( int  mode  )  [inline]

Sets the visualization mode. Must be a valid mode according to the MODE_ constants of this class.

Parameters:
mode 
String pav::lib::visualizer::Spectrum::toString (  )  [inline]

Returns a short string representation of this visualizer.

Returns:
visualizer info

Implements pav::lib::visualizer::Visualizer.


Member Data Documentation

Draw lines.

Draw dots.

Draw a shape.


The documentation for this class was generated from the following file:
 All Classes Functions Variables