Public Member Functions | Package Functions

pav::lib::visualizer::Visualizer Interface Reference

List of all members.

Public Member Functions

void setArea (float x1, float y1, float x2, float y2, boolean relative)
void process () throws PAVException
void setColor (int color)
void setColor (int a, int b, int mode)
void setColor (float[] thresholds, int[] colors, int mode)
String toString ()
void dispose ()

Package Functions

void drawTo (PApplet applet) throws PAVException

Detailed Description

A audio visualizer.

Author:
christopher

Member Function Documentation

void pav::lib::visualizer::Visualizer::dispose (  ) 

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

Implemented in pav::lib::visualizer::Boxes, pav::lib::visualizer::Bubbles, pav::lib::visualizer::MelSpectrum, pav::lib::visualizer::Phasor, pav::lib::visualizer::Rainbow, pav::lib::visualizer::Spectogram, pav::lib::visualizer::Spectrum, and pav::lib::visualizer::Waveform.

void pav::lib::visualizer::Visualizer::drawTo ( PApplet  applet  )  throws PAVException [package]

Sets the PApplet to draw to. Must be called before process().

Parameters:
applet Where to draw to. Must not be null
Exceptions:
PAVException If the visualizer does not work with this applet

Implemented in pav::lib::visualizer::Boxes, pav::lib::visualizer::Bubbles, and pav::lib::visualizer::VisualizerAbstract.

void pav::lib::visualizer::Visualizer::process (  )  throws PAVException
void pav::lib::visualizer::Visualizer::setArea ( float  x1,
float  y1,
float  x2,
float  y2,
boolean  relative 
)

Sets the area that can be used by this visualizer. If relative is set to false the visualizer will use the given values as its boundary, independent of the size of the PApplet. If relative is true, the values must be in the range [0,1] and represent an area relative to the size of the PApplet. Processings coordinate system is used, so (0,0) is the top left pixel.

Parameters:
x1 Must be >= 0 and <= 1 if relative is true
y1 Must be >= 0 and <= 1 if relative is true
x2 Must be > x1 and <= 1 if relative is true
y2 Must be > y1 and <= 1 if relative is true
relative Whether or not the values are relative

Implemented in pav::lib::visualizer::VisualizerAbstract.

void pav::lib::visualizer::Visualizer::setColor ( int  a,
int  b,
int  mode 
)

Sets two colors to interpolate between when drawing this visualizer. How a visualizer uses the colors specified is not defined. They might not be used at all.

Parameters:
a The color to start from
b The color to interpolate to
mode The color mode to use. Must bei either PApplet.RGB or PApplet.HSB

Implemented in pav::lib::visualizer::Boxes, and pav::lib::visualizer::VisualizerAbstract.

void pav::lib::visualizer::Visualizer::setColor ( int  color  ) 

Sets the color to use when drawing this visualizer. How a visualizer uses the color specified is not defined. It might not be used at all.

Parameters:
color The color to use

Implemented in pav::lib::visualizer::Boxes, and pav::lib::visualizer::VisualizerAbstract.

void pav::lib::visualizer::Visualizer::setColor ( float[]  thresholds,
int[]  colors,
int  mode 
)

Sets the colors to interpolate between when drawing this visualizer. How a visualizer uses the colors specified is not defined. They might not be used at all.

Parameters:
thresholds The relative thresholds to use. Values must be between 0 and 1 and sorted. The first element must be 0, the last 1. Must be of same length as colors
colors The The colors to use. Must be of same length as thresholds
mode The color mode to use. Must be either PApplet.RGB or PApplet.HSB

Implemented in pav::lib::visualizer::Boxes, and pav::lib::visualizer::VisualizerAbstract.

String pav::lib::visualizer::Visualizer::toString (  ) 

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