mirror of
https://github.com/thestk/stk
synced 2026-01-17 14:41:53 +00:00
Version 3.2
This commit is contained in:
committed by
Stephen Sinclair
parent
4b6500d3de
commit
3f126af4e5
34
include/FIR.h
Normal file
34
include/FIR.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/********************************************/
|
||||
/*
|
||||
General Finite-Impulse-Response (FIR)
|
||||
Digital Filter Class
|
||||
by Julius Smith, 1997
|
||||
*/
|
||||
/********************************************/
|
||||
|
||||
#if !defined(__FIR_h)
|
||||
#define __FIR_h
|
||||
|
||||
#include "Object.h"
|
||||
|
||||
class FIR : public Object
|
||||
{
|
||||
protected:
|
||||
int length;
|
||||
MY_FLOAT *coeffs;
|
||||
MY_FLOAT *pastInputs;
|
||||
int piOffset;
|
||||
MY_FLOAT delay;
|
||||
public:
|
||||
FIR(int length);
|
||||
FIR(const char *filterFile);
|
||||
~FIR();
|
||||
void clear(void);
|
||||
void setCoeffs(MY_FLOAT *theCoeffs);
|
||||
MY_FLOAT tick(MY_FLOAT input);
|
||||
MY_FLOAT lastOutput;
|
||||
MY_FLOAT getDelay(MY_FLOAT freq);
|
||||
int getLength(void);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user