 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   30   Noise( 
unsigned int seed = 0 );
 
   37   void setSeed( 
unsigned int seed = 0 );
 
   40   StkFloat 
lastOut( 
void )
 const { 
return lastFrame_[0]; };
 
   43   StkFloat 
tick( 
void );
 
   61   return lastFrame_[0] = (StkFloat) ( 2.0 * rand() / (RAND_MAX + 1.0) - 1.0 );
 
   66 #if defined(_STK_DEBUG_) 
   67   if ( channel >= frames.
channels() ) {
 
   68     oStream_ << 
"Noise::tick(): channel and StkFrames arguments are incompatible!";
 
   73   StkFloat *samples = &frames[channel];
 
   74   unsigned int hop = frames.
channels();
 
   75   for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
 
   76     *samples = (StkFloat) ( 2.0 * rand() / (RAND_MAX + 1.0) - 1.0 );
 
   78   lastFrame_[0] = *(samples-hop);
 
  
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:407
Noise(unsigned int seed=0)
Default constructor that can also take a specific seed value.
void setSeed(unsigned int seed=0)
Seed the random number generator with a specific seed value.
StkFloat tick(void)
Compute and return one output sample.
Definition: Noise.h:59
STK abstract unit generator parent class.
Definition: Generator.h:20
An STK class to handle vectorized audio data.
Definition: Stk.h:275
unsigned int channels(void) const
Return the number of channels represented by the data.
Definition: Stk.h:404
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
STK noise generator.
Definition: Noise.h:21
The STK namespace.
Definition: ADSR.h:6
StkFloat lastOut(void) const
Return the last computed output value.
Definition: Noise.h:40