|
Gin
|
Estimates the DC (very low frequency) content of a signal so it can be removed to form a DC blocker. More...
#include <gin_dcblocker.h>
Public Member Functions | |
| DCBlocker () | |
| ~DCBlocker () | |
| void | setSampleRate (float sampleRate_) |
| void | setCutoff (float cutoff_) |
| float | process (float x) |
| Returns the low-pass (DC) estimate of x. | |
| void | reset () |
Estimates the DC (very low frequency) content of a signal so it can be removed to form a DC blocker.
process() returns a first-order low-pass estimate of the input's DC bias. To block DC, subtract that estimate from the input: the difference is the high-passed signal. This is useful after certain DSP operations (like waveshaping or oscillators) that may introduce DC bias.
Key Features:
Usage:
Note: This is a per-sample filter. For stereo, use two instances.
| DCBlocker::DCBlocker | ( | ) |
| DCBlocker::~DCBlocker | ( | ) |
Referenced by WTOscillator::setSampleRate().
Referenced by WTOscillator::setSampleRate().
Returns the low-pass (DC) estimate of x.
Subtract this from x to block DC.
Referenced by WTOscillator::processAdding().
| void DCBlocker::reset | ( | ) |