Header file FIR.h Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

Header file FIR.h

/********************************************/  
/*  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;
    char name[64];
  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);
    char *getName(void);
    void setName(char *theName);
};

#endif


Next  |  Prev  |  Up  |  Top  |  Index  |  JOS Index  |  JOS Pubs  |  JOS Home  |  Search

[How to cite this work] [Order a printed hardcopy]

``Introduction to Digital Filters with Audio Applications'', by Julius O. Smith III, (August 2006 Edition).
Copyright © 2007-02-02 by Julius O. Smith III
Center for Computer Research in Music and Acoustics (CCRMA),   Stanford University
CCRMA  [Automatic-links disclaimer]