One Pole Low Pass
Overview
Basic one pole low-pass filter serves as an important building block due to its utility in a vast number of applications including noise reduction, signal smoothing, and extracting relevant information from a signal. The 6dB/octave slope of the single pole filter is suitable for many non-critical use-cases and its simplicity makes it computationally efficient.
Declaration
struct one_pole_lowpass
{
one_pole_lowpass(frequency f, float sps);
float operator()(float s);
float operator()() const;
one_pole_lowpass& operator=(bool y);
void cutoff(frequency f, float sps);
};
Expressions
Notation
lp
,a
,b
-
Objects of type
one_pole_lowpass
. f
-
Object of type
frequency
representing the cutoff frequency. sps
-
Floating point value representing samples per second.
s
-
Input sample.
Constructors and Assignment
Expression | Semantics |
---|---|
|
Construct a |
|
Copy construct a |
|
Assign |
|
Set the latest result to |
C++ brace initialization may also be used. |
Expression | Semantics | Return Type |
---|---|---|
|
Return the latest result. |
|
|
process the input sample, |
|