Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00028 /***************************************************/ 00029 00030 #ifndef STK_FILTER_H 00031 #define STK_FILTER_H 00032 00033 #include "Stk.h" 00034 #include <vector> 00035 #include <valarray> 00036 00037 class Filter : public Stk 00038 { 00039 public: 00041 Filter(void); 00042 00044 00048 Filter( std::vector<StkFloat> &bCoefficients, std::vector<StkFloat> &aCoefficients ); 00049 00051 virtual ~Filter(void); 00052 00054 void clear(void); 00055 00057 00063 void setCoefficients( std::vector<StkFloat> &bCoefficients, std::vector<StkFloat> &aCoefficients ); 00064 00066 00073 void setNumerator( std::vector<StkFloat> &bCoefficients ); 00074 00076 00084 void setDenominator( std::vector<StkFloat> &aCoefficients ); 00085 00087 00091 virtual void setGain(StkFloat gain); 00092 00094 virtual StkFloat getGain(void) const; 00095 00097 virtual StkFloat lastOut(void) const; 00098 00100 virtual StkFloat tick(StkFloat sample); 00101 00103 virtual StkFloat *tick(StkFloat *vector, unsigned int vectorSize); 00104 00106 00112 virtual StkFrames& tick( StkFrames& frames, unsigned int channel = 1 ); 00113 00114 protected: 00115 StkFloat gain_; 00116 std::vector<StkFloat> b_; 00117 std::vector<StkFloat> a_; 00118 std::vector<StkFloat> outputs_; 00119 std::vector<StkFloat> inputs_; 00120 00121 }; 00122 00123 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |