Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


BlitSaw.h

00001 /***************************************************/
00020 /***************************************************/
00021 
00022 #ifndef STK_BLITSAW_H
00023 #define STK_BLITSAW_H
00024 
00025 #include "Generator.h"
00026 
00027 class BlitSaw: public Generator
00028 {
00029  public:
00031   BlitSaw( StkFloat frequency = 220.0 );
00032 
00034   ~BlitSaw();
00035 
00037   void reset();
00038 
00040   void setFrequency( StkFloat frequency );
00041 
00043 
00055   void setHarmonics( unsigned int nHarmonics = 0 );
00056 
00057  protected:
00058 
00059   void updateHarmonics( void );
00060   StkFloat computeSample( void );
00061 
00062   unsigned int nHarmonics_;
00063   unsigned int m_;
00064   StkFloat rate_;
00065   StkFloat phase_;
00066   StkFloat p_;
00067   StkFloat C2_;
00068   StkFloat a_;
00069   StkFloat state_;
00070 
00071 };
00072 
00073 #endif

The Synthesis ToolKit in C++ (STK)
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved.