Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Blit.h

00001 /***************************************************/
00022 /***************************************************/
00023 
00024 #ifndef STK_BLIT_H
00025 #define STK_BLIT_H
00026 
00027 #include "Generator.h"
00028 
00029 class Blit: public Generator
00030 {
00031  public:
00033   Blit( StkFloat frequency = 220.0 );
00034 
00036   ~Blit();
00037 
00039   void reset();
00040 
00042 
00045   void setPhase( StkFloat phase ) { phase_ = PI * phase; };
00046 
00048 
00051   StkFloat getPhase() const { return phase_ / PI; };
00052 
00054   void setFrequency( StkFloat frequency );
00055 
00057 
00069   void setHarmonics( unsigned int nHarmonics = 0 );
00070 
00071  protected:
00072 
00073   void updateHarmonics( void );
00074   StkFloat computeSample( void );
00075 
00076   unsigned int nHarmonics_;
00077   unsigned int m_;
00078   StkFloat rate_;
00079   StkFloat phase_;
00080   StkFloat p_;
00081 
00082 };
00083 
00084 #endif

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