home *** CD-ROM | disk | FTP | other *** search
/ PC Musician 2000 / PC_Musician_2000.iso / PCMUSIC / NOTATION / SILENCE / BIQUAD.H < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-19  |  803 b   |  32 lines

  1. /*******************************************/
  2. /*  BiQuad (2-pole, 2-zero) Filter Class,  */
  3. /*  by Perry R. Cook, 1995-96              */ 
  4. /*  See books on filters to understand     */
  5. /*  more about how this works.  Nothing    */
  6. /*  out of the ordinary in this version.   */
  7. /*******************************************/
  8.  
  9. #if !defined(__BiQuad_h)
  10. #define __BiQuad_h
  11.  
  12. #include "Filter.h"
  13.  
  14. class BiQuad : public Filter
  15. {
  16.   protected:  
  17.     MY_FLOAT poleCoeffs[2];
  18.     MY_FLOAT zeroCoeffs[2];
  19.   public:
  20.     BiQuad();
  21.     ~BiQuad();
  22.     void clear();
  23.     void setPoleCoeffs(MY_FLOAT *coeffs);
  24.     void setZeroCoeffs(MY_FLOAT *coeffs);
  25.     void setGain(MY_FLOAT aValue);
  26.     void setFreqAndReson(MY_FLOAT freq, MY_FLOAT reson);
  27.     void setEqualGainZeroes();
  28.     MY_FLOAT tick(MY_FLOAT sample);
  29. };
  30.  
  31. #endif
  32.