Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00013 /***************************************************/ 00014 00015 #ifndef STK_BIQUAD_H 00016 #define STK_BIQUAD_H 00017 00018 #include "Filter.h" 00019 00020 class BiQuad : protected Filter 00021 { 00022 public: 00023 00025 BiQuad(); 00026 00028 virtual ~BiQuad(); 00029 00031 void clear(void); 00032 00034 void setB0(StkFloat b0); 00035 00037 void setB1(StkFloat b1); 00038 00040 void setB2(StkFloat b2); 00041 00043 void setA1(StkFloat a1); 00044 00046 void setA2(StkFloat a2); 00047 00049 00060 void setResonance(StkFloat frequency, StkFloat radius, bool normalize = false); 00061 00063 00069 void setNotch(StkFloat frequency, StkFloat radius); 00070 00072 00078 void setEqualGainZeroes(); 00079 00081 00085 void setGain(StkFloat gain); 00086 00088 StkFloat getGain(void) const; 00089 00091 StkFloat lastOut(void) const; 00092 00094 virtual StkFloat tick(StkFloat sample); 00095 00097 00103 virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 0 ); 00104 00105 protected: 00106 00107 // This function must be implemented in all subclasses. It is used 00108 // to get around a C++ problem with overloaded virtual functions. 00109 virtual StkFloat computeSample( StkFloat input ); 00110 }; 00111 00112 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2005 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |