17#ifndef SBL_CONTROL_CAM_HPP_
18#define SBL_CONTROL_CAM_HPP_
27inline float cam_evaluate(
const float* table, uint16_t size,
float input) {
28 float clamped = input < 0.0f ? 0.0f : (input > 1.0f ? 1.0f : input);
29 float pos = clamped *
static_cast<float>(size - 1);
30 uint16_t idx =
static_cast<uint16_t
>(pos);
31 float frac = pos -
static_cast<float>(idx);
32 return table[idx] + (table[idx + 1] - table[idx]) * frac;
37 const float* in,
float* out, uint16_t n) {
38 for (uint16_t i = 0; i < n; ++i) {
Control Stack v2: scheduler, event queue, merge, CC mapping, calibration, presets.
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.
float cam_evaluate(const float *table, uint16_t size, float input)