MIDI Control Surface library for Arduino
|
Go to the documentation of this file.
41 template <u
int8_t K,
class u
int_t>
44 EMA(uint_t initial = 0)
45 :
filtered((initial << K) - initial) {}
81 uint_t(0) < uint_t(-1),
82 "Error: the uint_t type should be an unsigned integer, otherwise, "
83 "the division using bit shifts is invalid.");
uint_t filter(uint_t input)
Filter the input: Given , calculate .
constexpr static uint_t fixedPointAHalf
void reset(uint_t value=0)
Reset the filter to the given value.
#define AH_DIAGNOSTIC_POP()
A class for single-pole infinite impulse response filters or exponential moving average filters.
A class for single-pole infinite impulse response filters or exponential moving average filters.
EMA_f(float pole)
Create an exponential moving average filter with a pole at the given location.
float operator()(float value)
Filter the input: Given , calculate .
#define AH_DIAGNOSTIC_WERROR()
uint_t operator()(uint_t value)
Filter the input: Given , calculate .
float filter(float value)
Filter the input: Given , calculate .