~ubuntu-branches/ubuntu/oneiric/muse/oneiric

« back to all changes in this revision

Viewing changes to synti/stklib/FIR.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
   General Finite-Impulse-Response (FIR)
 
4
   Digital Filter Class
 
5
   by Julius Smith, 1997
 
6
*/
 
7
/********************************************/  
 
8
 
 
9
#if !defined(__FIR_h)
 
10
#define __FIR_h
 
11
 
 
12
#include "Object.h"
 
13
 
 
14
class FIR : public Object
 
15
{
 
16
protected:  
 
17
  int length;
 
18
  MY_FLOAT *coeffs;
 
19
  MY_FLOAT *pastInputs;
 
20
  int piOffset;
 
21
  MY_FLOAT delay;
 
22
public:
 
23
  FIR(int length);
 
24
  FIR(const char *filterFile);
 
25
  ~FIR();
 
26
  void clear(void);
 
27
  void setCoeffs(MY_FLOAT *theCoeffs);
 
28
  MY_FLOAT tick(MY_FLOAT input);
 
29
  MY_FLOAT lastOutput;
 
30
  MY_FLOAT getDelay(MY_FLOAT freq);
 
31
  int getLength(void);
 
32
};
 
33
 
 
34
#endif