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);