csl::PinkNoise Class Reference

#include <Noise.h>

Inheritance diagram for csl::PinkNoise:

csl::Noise csl::UnitGenerator csl::Scalable List of all members.

Detailed Description

Pink noise -- equal power per octave


Public Member Functions

 PinkNoise ()
 Constructors.
 PinkNoise (double ampl, double offset=0.f)
 PinkNoise (int seed, double ampl=1.f, double offset=0.f)
 ~PinkNoise ()
void nextBuffer (Buffer &outputBuffer, unsigned outBufNum) throw (CException)
 the monoNextBuffer method is where the DSP takes place
sample nextPink ()
 returns the next pink noise sample

Protected Member Functions

void initialize (int numRows)
 set up PinkNoise for N rows of generators

Protected Attributes

int mPinkRows [PINK_MAX_RANDOM_ROWS]
 Pink noise generator rows.
int mPinkRunningSum
 Used to optimize summing of generators.
int mPinkIndex
 Incremented each sample.
int mPinkIndexMask
 Index wrapped by ANDing with this mask.
float mPinkScalar
 Used to scale within range of -1.0 to +1.0.


Constructor & Destructor Documentation

PinkNoise::PinkNoise  ) 
 

Constructors.

Most of this code was taken from an public domain C implementation written by Phil Burk. The code and the webpage explaining it is at http://www.firstpr.com.au/dsp/pink-noise/phil_burk_19990905mPatestmPink.c and http://www.firstpr.com.au/dsp/pink-noise/

PinkNoise::PinkNoise double  ampl,
double  offset = 0.f
 

PinkNoise::PinkNoise int  seed,
double  ampl = 1.f,
double  offset = 0.f
 

csl::PinkNoise::~PinkNoise  )  [inline]
 


Member Function Documentation

void PinkNoise::nextBuffer Buffer outputBuffer,
unsigned  outBufNum
throw (CException)
 

the monoNextBuffer method is where the DSP takes place

sample PinkNoise::nextPink  ) 
 

returns the next pink noise sample

void PinkNoise::initialize int  numRows  )  [protected]
 

set up PinkNoise for N rows of generators


Member Data Documentation

int csl::PinkNoise::mPinkRows[PINK_MAX_RANDOM_ROWS] [protected]
 

Pink noise generator rows.

int csl::PinkNoise::mPinkRunningSum [protected]
 

Used to optimize summing of generators.

int csl::PinkNoise::mPinkIndex [protected]
 

Incremented each sample.

int csl::PinkNoise::mPinkIndexMask [protected]
 

Index wrapped by ANDing with this mask.

float csl::PinkNoise::mPinkScalar [protected]
 

Used to scale within range of -1.0 to +1.0.


The documentation for this class was generated from the following files:
Generated on Fri Apr 6 20:18:20 2007 for CSL by  doxygen 1.4.5-20051010