|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
A one-pole high-pass with its zero at DC. More...
A one-pole high-pass with its zero at DC.
H(z) = (1 - z^-1) / (1 - r z^-1). The pole r sets the corner; the default, 0.995, puts the -3 dB point at DEFAULT_CORNER, 38.1 Hz at 48 kHz. Below the signal transport: the pole is its natural-unit input, set by the component or app that owns it. It declares no ports; the buffer call takes none, and PARAMETERS names the pole so a tool can run it alone.
Definition at line 23 of file dc_block.hpp.
#include <dc_block.hpp>
Public Member Functions | |
| void | set_pole (float r) |
| Set the pole; closer to 1 is a lower corner. | |
| float | process (float x) |
| One frame. | |
| void | process (const float *in, float *out, uint16_t frames) |
| A buffer of frames. In place is fine: out may be in. | |
| void | reset () |
| Clear the state. | |
| float | pole () const |
| The pole. | |
Static Public Attributes | |
| static constexpr float | DEFAULT_POLE = 0.995f |
| static constexpr float | DEFAULT_CORNER = 7.9375e-4f |
| static constexpr transport::Parameter< DcBlock > | PARAMETERS [] |
| The parameters, for tools. | |
|
inline |
Set the pole; closer to 1 is a lower corner.
| r | Pole, clamped to [0, 1); a NaN is not caught |
Definition at line 35 of file dc_block.hpp.
|
inline |
One frame.
| x | Input sample |
Definition at line 44 of file dc_block.hpp.
Referenced by process().
|
inline |
A buffer of frames. In place is fine: out may be in.
| in | Input buffer, frames long | |
| [out] | out | Output buffer, frames long |
| frames | Frame count |
Definition at line 64 of file dc_block.hpp.
References process().
|
inline |
Clear the state.
Definition at line 71 of file dc_block.hpp.
|
inline |
The pole.
Definition at line 77 of file dc_block.hpp.
|
staticconstexpr |
The pole until set_pole() is called
Definition at line 25 of file dc_block.hpp.
|
staticconstexpr |
The default pole's -3 dB point, in cycles per frame: 38.1 Hz at 48 kHz. A test holds the two together.
Definition at line 27 of file dc_block.hpp.
|
staticconstexpr |
The parameters, for tools.
Definition at line 52 of file dc_block.hpp.