 
    
   
Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial
   35   BlitSaw( StkFloat frequency = 220.0 );
 
   62   StkFloat 
lastOut( 
void )
 const { 
return lastFrame_[0]; };
 
   65   StkFloat 
tick( 
void );
 
   79   void updateHarmonics( 
void );
 
   81   unsigned int nHarmonics_;
 
  110   StkFloat tmp, denominator = sin( phase_ );
 
  111   if ( fabs(denominator) <= std::numeric_limits<StkFloat>::epsilon() )
 
  114     tmp =  sin( m_ * phase_ );
 
  115     tmp /= p_ * denominator;
 
  119   state_ = tmp * 0.995;
 
  122   if ( phase_ >= PI ) phase_ -= PI;
 
  125          return lastFrame_[0];
 
  130 #if defined(_STK_DEBUG_) 
  131   if ( channel >= frames.
channels() ) {
 
  132     oStream_ << 
"BlitSaw::tick(): channel and StkFrames arguments are incompatible!";
 
  138   StkFloat *samples = &frames[channel];
 
  139   unsigned int hop = frames.
channels();
 
  140   for ( 
unsigned int i=0; i<frames.
frames(); i++, samples += hop )
 
  
unsigned int frames(void) const
Return the number of sample frames represented by the data.
Definition: Stk.h:407
void setFrequency(StkFloat frequency)
Set the sawtooth oscillator rate in terms of a frequency in Hz.
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
StkFloat lastOut(void) const
Return the last computed output value.
Definition: BlitSaw.h:62
static void handleError(const char *message, StkError::Type type)
Static function for error reporting and handling using c-strings.
StkFloat tick(void)
Compute and return one output sample.
Definition: BlitSaw.h:92
void setHarmonics(unsigned int nHarmonics=0)
Set the number of harmonics generated in the signal.
BlitSaw(StkFloat frequency=220.0)
Class constructor.
STK band-limited sawtooth wave class.
Definition: BlitSaw.h:31
The STK namespace.
Definition: ADSR.h:6
~BlitSaw()
Class destructor.
void reset()
Resets the oscillator state and phase to 0.