Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

syn::FirFilter Class Reference

finite impulse response filter. More...

#include <Filter.h>

List of all members.

Public Methods

 FirFilter ()
void filter (float &sample)
 digital filter. More...

int order () const
 return the maximum delay, or the order of the filter. More...

void invert ()
 convert between lowpass to highpass (and viceversa). More...

void setSimpleLowPass ()
 make this filter a simple lowpass filter. More...

void setSimpleHighPass ()
 make this filter a simple highpass filter. More...

void setSimpleBandReject ()
 make this filter a simple bandreject filter. More...

void setSimpleBandPass ()
 make this filter a simple bandpass filter. More...

void setCutoff (float fc, float sampRate)
 make this filter low pass, with fc cuttoff frequency. More...


Detailed Description

finite impulse response filter.

this type of filter is fast but less than ideal (i.e. it is finite). this is a 2nd order filter (can look behind by 2 samples).

See also:
computer music - dodge (chapter on subtractive synthesis).
Todo:
: doesn't work! I don't know why...

Definition at line 32 of file Filter.h.


Constructor & Destructor Documentation

syn::FirFilter::FirFilter ( ) [inline]
 

Definition at line 35 of file Filter.h.


Member Function Documentation

void syn::FirFilter::filter ( float & sample ) [inline]
 

digital filter.

Example (how to use this filter on a buffer of float-type samples)

/code for (int x = 0; x < buf.size(); ++x) { f.filter( buf[x] ); } /endcode

Definition at line 54 of file Filter.h.

int syn::FirFilter::order ( ) const [inline]
 

return the maximum delay, or the order of the filter.

Definition at line 66 of file Filter.h.

Referenced by setCutoff().

void syn::FirFilter::invert ( ) [inline]
 

convert between lowpass to highpass (and viceversa).

Definition at line 70 of file Filter.h.

void syn::FirFilter::setSimpleLowPass ( ) [inline]
 

make this filter a simple lowpass filter.

NOTE: unflexible but fast, useful as a tone control

Definition at line 80 of file Filter.h.

void syn::FirFilter::setSimpleHighPass ( ) [inline]
 

make this filter a simple highpass filter.

NOTE: unflexible but fast, useful as a tone control

Definition at line 90 of file Filter.h.

void syn::FirFilter::setSimpleBandReject ( ) [inline]
 

make this filter a simple bandreject filter.

NOTE: unflexible but fast, useful as a tone control

Definition at line 100 of file Filter.h.

void syn::FirFilter::setSimpleBandPass ( ) [inline]
 

make this filter a simple bandpass filter.

NOTE: unflexible but fast, useful as a tone control

Definition at line 110 of file Filter.h.

void syn::FirFilter::setCutoff ( float fc,
float sampRate ) [inline]
 

make this filter low pass, with fc cuttoff frequency.

Parameters:
fc   Positive value in Herz between 0 and Nyquist frequency (samplingrate / 2).
sampRate   sampling rate of your data in hz.
See also:
bottom of page 203 in "computer music" - charles dodge

Definition at line 122 of file Filter.h.


The documentation for this class was generated from the following file:
Generated at Mon Apr 15 09:27:55 2002 for subsynth by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001