Implementation of a first order lag or PT1 filter. Can be used for example to smooth noisy values a bit or detect envelopes.
More...
#include <pt1filter.h>
Implementation of a first order lag or PT1 filter. Can be used for example to smooth noisy values a bit or detect envelopes.
- See also
- https://en.wikipedia.org/wiki/Low-pass_filter
◆ PT1Filter()
PT1Filter::PT1Filter |
( |
double |
tau = 1 , |
|
|
double |
rate = 1 |
|
) |
| |
◆ getValue()
double PT1Filter::getValue |
( |
| ) |
const |
|
inline |
Get the current filter output value.
- Returns
- Current filter output value.
◆ process()
double PT1Filter::process |
( |
double |
value | ) |
|
Processes a new sample.
- Returns
- New filter output value.
◆ reset()
void PT1Filter::reset |
( |
| ) |
|
Resets the filter state to default.
◆ FALLBACK_RATE
const double PT1Filter::FALLBACK_RATE = 200 |
|
static |
◆ m_dt_tau
double PT1Filter::m_dt_tau |
|
private |
◆ m_value
double PT1Filter::m_value |
|
private |
The documentation for this class was generated from the following files: