|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
The control stack: scheduler, event queue, merge, CC mapping, calibration. More...
The control stack: scheduler, event queue, merge, CC mapping, calibration.
Namespaces | |
| namespace | display |
| Indicators: RGB LED state and colors. | |
| namespace | input |
| Inputs: debounce, decoding, smoothing and scaling of raw samples. | |
Classes | |
| struct | Cam |
| struct | CamPitchAxis |
| struct | CcEntry |
| One row of a CC map. More... | |
| class | CcMapper |
| Routes MIDI CCs to app targets through a constexpr table. More... | |
| class | Clock |
| class | EventQueue |
| Lock-free SPSC event queue from one producing context into the control tick. More... | |
| class | Latest |
| The last source to move wins. More... | |
| struct | LinearFit |
| class | MidiKeys |
| struct | NoCcStore |
| class | PanelReport |
The values of the parameters a panel shows, as #PANEL lines. More... | |
| class | ParamBank |
| class | ParamEcho |
| class | Pickup |
| A takeover source must reach the held value before it captures it. More... | |
| class | PointCalibration |
| Capture N reference points, then fit. More... | |
| class | Priority |
| The highest-priority active source wins. More... | |
| class | Scheduler |
| Divider slots over one base period, run in a fixed stage order. More... | |
| class | Selector |
| class | Snapshot |
| Double-buffered struct with a sequence number, for one writer and one reader. More... | |
| struct | SystemTimerSource |
| struct | VOctStandard |
| 1 V per octave: the library's pitch is octaves (CvMapping::VOct) More... | |
Typedefs | |
| using | CcCurve = Cam |
| using | SubscriberFn = void(*)(void *context, uint32_t elapsed_ticks) |
| using | TargetClock = Clock< SystemTimerSource > |
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 } |
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 (const float *table, uint16_t size, const float *in, float *out, uint16_t frames) |
| float | cam_evaluate (const Cam &cam, float input) |
| void | cam_evaluate (const Cam &cam, const float *in, float *out, uint16_t frames) |
| template<size_t N> | |
| float | cam_evaluate (const float(&table)[N], float input) |
| template<typename Target , size_t N, size_t COUNT> | |
| PanelReport (const Target(&)[N], const char *const (&)[COUNT]) -> PanelReport< Target, N > | |
| constexpr uint32_t | ticks_to_us (uint64_t ticks, uint32_t ticks_per_second) |
| template<typename Output , typename Sched > | |
| void | write_scheduler_report (const Sched &scheduler, uint8_t slot, uint32_t ticks_per_second) |
| constexpr uint8_t | select (float control, uint8_t positions) |
Variables | |
| constexpr size_t | CAM_GUARD_POINTS = 1 |
| constexpr CcCurve | CC_LINEAR {} |
| constexpr uint8_t | ANY_CHANNEL = 0xFF |
| constexpr uint8_t | STAGE_COUNT = 4 |
| using sbl::control::CcCurve = typedef Cam |
A row's curve: a Cam, or linear when it has no table.
Definition at line 18 of file cc_mapper.hpp.
| using sbl::control::SubscriberFn = typedef void (*)(void* context, uint32_t elapsed_ticks) |
Subscriber callback: context pointer and clock ticks elapsed since its slot last ran.
Definition at line 25 of file scheduler.hpp.
| using sbl::control::TargetClock = typedef Clock<SystemTimerSource> |
Definition at line 27 of file target_clock.hpp.
|
strong |
Where a PointCalibration is in its routine.
Definition at line 116 of file calibration.hpp.
|
strong |
Row flags.
| Enumerator | |
|---|---|
| None | 7-bit: |
| Paired14 | 14-bit: |
Definition at line 30 of file cc_mapper.hpp.
|
strong |
Intra-run order. Every due subscriber of a stage runs before any of the next.
Definition at line 15 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 65 of file calibration.hpp.
References sbl::control::LinearFit::offset, and sbl::control::LinearFit::scale.
Referenced by sbl::control::PointCalibration< N, Standard >::capture().
|
inline |
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 65 of file cam.hpp.
Referenced by cam_evaluate(), cam_evaluate(), cam_evaluate(), cam_evaluate(), and sbl::control::CcMapper< Target >::on_cc().
|
inline |
Evaluate a cam table across a buffer.
Definition at line 74 of file cam.hpp.
References cam_evaluate().
|
inline |
Evaluate a Cam at a single input position, clamped to [0, 1].
Definition at line 81 of file cam.hpp.
References cam_evaluate().
|
inline |
|
inline |
Evaluate a LUTE table, its size read from the array's type.
Definition at line 90 of file cam.hpp.
References cam_evaluate(), and sbl::control::Cam::of().
|
inlineconstexpr |
A count of ticks in microseconds, at a tick rate in ticks per second.
Definition at line 25 of file scheduler_report.hpp.
Referenced by write_scheduler_report().
| void sbl::control::write_scheduler_report | ( | const Sched & | scheduler, |
| uint8_t | slot, | ||
| uint32_t | ticks_per_second | ||
| ) |
Write a slot's late runs, skipped periods and worst delay as a #SYS.SCHED line.
| ticks_per_second | the rate of the clock the scheduler runs on |
Definition at line 35 of file scheduler_report.hpp.
References sbl::log::TaggedLine< SIZE >::field(), and ticks_to_us().
|
inlineconstexpr |
The position, 0 to positions - 1, of a control in [0, 1], by equal shares of its travel. Values outside [0, 1] and NaN land on an end position.
Definition at line 29 of file selector.hpp.
Referenced by sbl::control::Selector< Positions >::update().
|
inlineconstexpr |
The guard points a cam table carries after its entries (LUTE's guard_points for a cam).
Definition at line 40 of file cam.hpp.
Referenced by sbl::control::Cam::of().
|
inlineconstexpr |
A curve with no table: the row's output is its input.
Definition at line 27 of file cc_mapper.hpp.
|
inlineconstexpr |
Row channel that matches every channel.
Definition at line 36 of file cc_mapper.hpp.
Referenced by sbl::control::CcMapper< Target >::on_cc().
|
inlineconstexpr |
number of Stage values
Definition at line 22 of file scheduler.hpp.
Referenced by sbl::control::Scheduler< Slots, Capacity >::run().