csl::PinkNoise Class Reference

#include <Noise.h>

Inheritance diagram for csl::PinkNoise:

csl::Noise csl::UnitGenerator csl::Scalable csl::Model csl::Controllable

List of all members.

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)
 Destructor.
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.


Detailed Description

Pink noise -- equal power per octave

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/

References initialize(), csl::kExpand, and csl::UnitGenerator::setCopyPolicy().

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) [virtual]

Destructor.

the monoNextBuffer method is where the DSP takes place

Reimplemented from csl::UnitGenerator.

References DECLARE_SCALABLE_CONTROLS, LOAD_SCALABLE_CONTROLS, csl::logMsg(), and UPDATE_SCALABLE_CONTROLS.

sample PinkNoise::nextPink (  ) 

void PinkNoise::initialize ( int  numRows  )  [protected]

set up PinkNoise for N rows of generators

Setup PinkNoise structure for N rows of generators.

References mPinkIndex, mPinkIndexMask, mPinkRows, mPinkRunningSum, mPinkScalar, and PINK_RANDOM_BITS.

Referenced by PinkNoise().


Member Data Documentation

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

Pink noise generator rows.

Referenced by initialize(), and nextPink().

Used to optimize summing of generators.

Referenced by initialize(), and nextPink().

int csl::PinkNoise::mPinkIndex [protected]

Incremented each sample.

Referenced by initialize(), and nextPink().

Index wrapped by ANDing with this mask.

Referenced by initialize(), and nextPink().

float csl::PinkNoise::mPinkScalar [protected]

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

Referenced by initialize(), and nextPink().


The documentation for this class was generated from the following files:

Generated on Thu Sep 17 23:14:17 2009 for CSL by  doxygen 1.5.8