|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Control Stack v2: scheduler, event queue, merge, CC mapping, calibration, presets. More...
Control Stack v2: scheduler, event queue, merge, CC mapping, calibration, presets.
Classes | |
| struct | CcCurve |
| A LUTE cam table (size + 1 entries, guard point included), or linear when table is null. More... | |
| struct | CcEntry |
| class | CcMapper |
| class | EventQueue |
| class | Latest |
| The last source to move wins. More... | |
| struct | LinearFit |
| measured su → corrected su. Identity until a fit is computed or loaded. More... | |
| class | Pickup |
| A takeover source must reach the held value before it captures it. More... | |
| class | PointCalibration |
| Capture N reference points, then fit. More... | |
| struct | Preset |
| A named set of controller values, selected by MIDI program number. More... | |
| struct | PresetCc |
| One controller value in a preset. More... | |
| class | Priority |
| The highest-priority active source wins. More... | |
| class | Scheduler |
| struct | VOctStandard |
| 1 V per octave in SBL pitch su (1.0 su spans 8 octaves) More... | |
Typedefs | |
| using | TickFn = void(*)(void *context, uint32_t elapsed_samples) |
| Subscriber callback: context pointer and samples elapsed since its slot last ran. | |
Enumerations | |
| enum class | CalState : uint8_t { Idle , Capturing , Done , Failed } |
| enum class | CcFlags : uint8_t { None = 0 , Paired14 = 1 << 0 } |
| enum class | Stage : uint8_t { Drain , Update , Merge , Publish } |
| Intra-tick order. Every due subscriber of a stage runs before any of the next. More... | |
Functions | |
| bool | fit_points (const float *measured, const float *expected, uint8_t n, LinearFit &out) |
| Least-squares line through captured points. | |
| float | cam_evaluate (const float *table, uint16_t size, float input) |
| void | cam_evaluate_block (const float *table, uint16_t size, const float *in, float *out, uint16_t n) |
| Evaluate a cam table across a buffer. | |
| const Preset * | find_preset (const Preset *presets, uint8_t count, uint8_t program) |
| The preset a program selects, or nullptr if the table has none. | |
| template<typename Sink > | |
| void | apply_preset (const Preset &preset, Sink &&sink) |
| Send a preset's values wherever a controller's would go. | |
Variables | |
| constexpr CcCurve | kCcLinear {} |
| constexpr uint8_t | kAnyChannel = 0xFF |
| Row channel that matches every channel. | |
| constexpr uint8_t | kStageCount = 4 |
| using sbl::control::TickFn = typedef void (*)(void* context, uint32_t elapsed_samples) |
Subscriber callback: context pointer and samples elapsed since its slot last ran.
Definition at line 52 of file scheduler.hpp.
|
strong |
Definition at line 96 of file calibration.hpp.
|
strong |
| Enumerator | |
|---|---|
| None | |
| Paired14 | 14-bit: |
Definition at line 46 of file cc_mapper.hpp.
|
strong |
Intra-tick order. Every due subscriber of a stage runs before any of the next.
| Enumerator | |
|---|---|
| Drain | |
| Update | |
| Merge | |
| Publish | |
Definition at line 42 of file scheduler.hpp.
|
inline |
Least-squares line through captured points.
| measured | what the source read at each reference |
| expected | what it should have read (the standard's answer) |
| n | 2 or more |
| out | the fit, untouched when the points are degenerate |
Definition at line 55 of file calibration.hpp.
References sbl::control::LinearFit::offset, and sbl::control::LinearFit::scale.
Referenced by sbl::control::PointCalibration< N, Standard >::capture().
Evaluate a cam table at a single input position. Input clamped to [0, 1]. Returns linearly interpolated table value. Table must have at least 1 guard point (size + 1 entries).
Definition at line 27 of file cam.hpp.
Referenced by cam_evaluate_block(), and sbl::control::CcMapper< Target >::on_cc().
|
inline |
Evaluate a cam table across a buffer.
Definition at line 36 of file cam.hpp.
References cam_evaluate().
|
inline |
The preset a program selects, or nullptr if the table has none.
Definition at line 48 of file preset.hpp.
|
inline |
Send a preset's values wherever a controller's would go.
Definition at line 58 of file preset.hpp.
References sbl::control::CcEntry< Target >::cc.
Definition at line 44 of file cc_mapper.hpp.
Row channel that matches every channel.
Definition at line 52 of file cc_mapper.hpp.
Referenced by sbl::control::CcMapper< Target >::on_cc().
Definition at line 49 of file scheduler.hpp.
Referenced by sbl::control::Scheduler< Slots, Capacity >::run().