~ubuntu-branches/ubuntu/feisty/muse/feisty

« back to all changes in this revision

Viewing changes to synti/stklib/BiQuad.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Kobras
  • Date: 2002-04-23 17:28:23 UTC
  • Revision ID: james.westby@ubuntu.com-20020423172823-w8yplzr81a759xa3
Tags: upstream-0.5.2
ImportĀ upstreamĀ versionĀ 0.5.2

Show diffs side-by-side

added added

removed removed

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