|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Linear calibration parameters for V/Oct conversion. More...
#include <voct.hpp>
Static Public Member Functions | |
| static constexpr VoctCalibration | default_3v3 () |
| Default calibration for 0–3.3V input, 1V/Oct, 16-bit ADC. | |
| static constexpr VoctCalibration | from_two_point (uint16_t adc_low, float note_low, uint16_t adc_high, float note_high) |
| Compute calibration from two known points. | |
Public Attributes | |
| float | scale |
| Semitones per ADC unit. | |
| float | offset |
| MIDI note number at ADC=0. | |
Linear calibration parameters for V/Oct conversion.
Maps smoothed ADC value to MIDI note number: note = adc_value * scale + offset
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
Compute calibration from two known points.
Apply known voltages, read the ADC values, and provide the expected MIDI note at each point. Scale and offset are derived from the two-point linear fit.
| adc_low | ADC reading at the low calibration voltage |
| note_low | Expected MIDI note at the low point |
| adc_high | ADC reading at the high calibration voltage |
| note_high | Expected MIDI note at the high point |
| float sbl::components::cv::VoctCalibration::offset |
MIDI note number at ADC=0.
Definition at line 42 of file voct.hpp.
Referenced by sbl::components::cv::VoctInput::semitones().
| float sbl::components::cv::VoctCalibration::scale |
Semitones per ADC unit.
Definition at line 41 of file voct.hpp.
Referenced by sbl::components::cv::VoctInput::semitones().