|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Source calibration: fit, standard, routine. More...
Source calibration: fit, standard, routine.
A source reads a little off, for example from a divider's tolerance or an op-amp's offset. Calibration measures the source against known references and stores the correction as a line - scale and offset - that the app applies to every later reading.
One shape drives every calibration an app runs - a button calls advance(), another cancel(), and the UI slot polls state() for the LED. The library holds no storage: fit() is POD, and the app writes it wherever it keeps its calibration.
Usage - two-point V/Oct on a 1 V and 3 V reference:
Loading a stored fit skips the routine entirely: cal.set_fit(saved).
Definition in file calibration.hpp.
#include <cstdint>Go to the source code of this file.
Classes | |
| struct | sbl::control::LinearFit |
| struct | sbl::control::VOctStandard |
| 1 V per octave: the library's pitch is octaves (CvMapping::VOct) More... | |
| class | sbl::control::PointCalibration< N, Standard > |
| Capture N reference points, then fit. More... | |
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs code. | |
| namespace | sbl::control |
| The control stack: scheduler, event queue, merge, CC mapping, calibration. | |
Enumerations | |
| enum class | sbl::control::CalState : uint8_t { sbl::control::Idle , sbl::control::Capturing , sbl::control::Done , sbl::control::Failed } |
Functions | |
| bool | sbl::control::fit_points (const float *measured, const float *expected, uint8_t n, LinearFit &out) |
| Least-squares line through captured points. | |