|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Smoothed CV input emitting normalized signal units. More...
Smoothed CV input emitting normalized signal units.
Definition at line 98 of file cv_input.hpp.
#include <cv_input.hpp>
Public Member Functions | |
| CvInput (const CvInputConfig &config={}) | |
| Construct from settings. | |
| CvInput (Smoothing smoothing) | |
| Construct with a smoothing strength. | |
| void | update (uint16_t raw) |
| Feed a new raw ADC sample. | |
| void | update_dma (const uint16_t *buffer, uint8_t channel_index) |
| Read one channel from a DMA scan buffer and update. | |
| uint16_t | raw () const |
| Last raw (unfiltered) ADC count - for calibration routines. | |
| float | value () const |
| Smoothed output in signal units, per the configured mapping. | |
| void | set_mapping (CvMapping mapping) |
| Set the jack's musical role (structural; runtime-remappable) | |
| CvMapping | mapping () const |
| void | set_conditioning (const CvConditioning &cond) |
| Set the analog front-end description (once at init, typically) | |
| void | set_electrical (const sbl::hal::adc::Electrical &e) |
| const CvConditioning & | conditioning () const |
| void | set_smoothing (Smoothing smoothing) |
| Change smoothing level without resetting filter state. | |
| void | reset () |
| Reset filter state. | |
|
inlineexplicit |
Construct from settings.
| config | Settings; the default is no smoothing |
Definition at line 104 of file cv_input.hpp.
|
inlineexplicit |
Construct with a smoothing strength.
| smoothing | EWMA strength |
Definition at line 110 of file cv_input.hpp.
|
inline |
Feed a new raw ADC sample.
| raw | ADC sample, 0 to 65535 |
Definition at line 116 of file cv_input.hpp.
References raw(), and sbl::control::input::Ewma::update().
Referenced by update_dma().
|
inline |
Read one channel from a DMA scan buffer and update.
The volatile cast forces a real memory read: DMA updates the buffer asynchronously.
| buffer | DMA scan buffer |
| channel_index | Index of this input's channel in the buffer |
Definition at line 131 of file cv_input.hpp.
References update().
|
inline |
Last raw (unfiltered) ADC count - for calibration routines.
Definition at line 136 of file cv_input.hpp.
Referenced by update().
|
inline |
Smoothed output in signal units, per the configured mapping.
Definition at line 139 of file cv_input.hpp.
References sbl::control::input::Ewma::value().
|
inline |
Set the jack's musical role (structural; runtime-remappable)
Definition at line 142 of file cv_input.hpp.
|
inline |
Definition at line 144 of file cv_input.hpp.
|
inline |
Set the analog front-end description (once at init, typically)
Definition at line 147 of file cv_input.hpp.
|
inline |
Condition from a port's electrical description (the board role's init hook).
Definition at line 150 of file cv_input.hpp.
References sbl::control::input::CvConditioning::from().
|
inline |
Definition at line 152 of file cv_input.hpp.
|
inline |
Change smoothing level without resetting filter state.
Definition at line 155 of file cv_input.hpp.
References sbl::control::input::Ewma::set_shift().
|
inline |
Reset filter state.
Definition at line 158 of file cv_input.hpp.
References sbl::control::input::Ewma::reset().