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

pp::Filters::IIRComb Class Template Reference

Infinite Impulse Response Comb filter functor. More...

#include <Filters.h>

Inheritance diagram for pp::Filters::IIRComb

Inheritance graph
[legend]
Collaboration diagram for pp::Filters::IIRComb:

Collaboration graph
[legend]
List of all members.

Public Methods

 IIRComb (unsigned delay=10, float c1 = 1.0f, float c2 = 1.0f)
virtual const char* GetName () const
operator() (const T& x)
double FrequencyResponse (float f)

Detailed Description

template<typename T = short> template class pp::Filters::IIRComb

Infinite Impulse Response Comb filter functor.

Some poeple use this for reverb when d corresponds to more than a few milliseconds.

The basic equation is: y[n] = x[n] + y[n-d]

y(n) = x(n - D) + g * y(n - D)

D represents the number of samples of the "delay". So, one can see that the current output y(n) is equal to a delayed input x(n-D) plus a previous output y(n-D) multiplied by a gain factor g. If the value for D is high (say a tenth of a second), the comb filter will act as a kind of "echo". The gain g (usually between 0 and 1) determines the "reverberation time" of the filter. Charles Dodge has suggested that the relationship between g and the reverberation time (as composers might prefer to think of it) is:

D = delay in seconds rvt = reverberation time in seconds g = pow(0.001, (D/sr/rvt))


The documentation for this class was generated from the following file:
Generated at Mon Nov 27 01:46:58 2000 for LibPenguinPlay by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000