|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
#include <hysteresis_quantizer.hpp>
Public Member Functions | |
| int | process (uint16_t value, uint8_t n_steps) |
| int | step () const |
| Current quantized step (valid after first process() call). | |
| void | set_hysteresis (uint8_t h) |
| Set hysteresis amount (0-255). 0 = no hysteresis, 26 ≈ 10%, 128 = 50%. | |
| void | reset () |
| Reset — next process() call will snap to the raw value. | |
Definition at line 25 of file hysteresis_quantizer.hpp.
|
inline |
Process a raw value into a quantized step index.
| value | Input value (0-65535, typically from ADC or pot). |
| n_steps | Number of output steps (2-256). |
Definition at line 31 of file hysteresis_quantizer.hpp.
|
inline |
Reset — next process() call will snap to the raw value.
Definition at line 81 of file hysteresis_quantizer.hpp.
|
inline |
Set hysteresis amount (0-255). 0 = no hysteresis, 26 ≈ 10%, 128 = 50%.
Definition at line 78 of file hysteresis_quantizer.hpp.
|
inline |
Current quantized step (valid after first process() call).
Definition at line 75 of file hysteresis_quantizer.hpp.