Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   Tutorial


Noise Class Reference

STK noise generator. More...

#include <Noise.h>

Inheritance diagram for Noise:

Stk SubNoise List of all members.

Public Member Functions

 Noise ()
 Default constructor which seeds the random number generator with the system time.

 Noise (unsigned int seed)
 Constructor which seeds the random number generator with a given seed.

virtual ~Noise ()
 Class destructor.

void setSeed (unsigned int seed=0)
 Seed the random number generator with a specific seed value.

virtual MY_FLOAT tick ()
 Return a random number between -1.0 and 1.0 using rand().

virtual MY_FLOAT * tick (MY_FLOAT *vector, unsigned int vectorSize)
 Return vectorSize random numbers between -1.0 and 1.0 in vector.

MY_FLOAT lastOut () const
 Return the last computed value.


Detailed Description

STK noise generator.

Generic random number generation using the C rand() function. The quality of the rand() function varies from one OS to another.

by Perry R. Cook and Gary P. Scavone, 1995 - 2002.

Definition at line 18 of file Noise.h.


Constructor & Destructor Documentation

Noise::Noise unsigned int  seed  ) 
 

Constructor which seeds the random number generator with a given seed.

If the seed value is zero, the random number generator is seeded with the system time.


Member Function Documentation

void Noise::setSeed unsigned int  seed = 0  ) 
 

Seed the random number generator with a specific seed value.

If no seed is provided or the seed value is zero, the random number generator is seeded with the current system time.


The documentation for this class was generated from the following file:
The Synthesis ToolKit in C++ (STK)
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved.