15#ifndef SBL_DSP_PRIMITIVES_SOFT_LIMITER_HPP_
16#define SBL_DSP_PRIMITIVES_SOFT_LIMITER_HPP_
28 void process(
float* buf, uint16_t frames) {
29 for (uint16_t i = 0; i < frames; ++i) {
30 buf[i] =
limit(buf[i]);
37 return x * (27.0f + x2) / (27.0f + 9.0f * x2);
float process(float x)
Process a single sample.
void process(float *buf, uint16_t frames)
Process a block in-place.
static float limit(float x)
The rational sigmoid, available for composition use.
Stateful, single-concern building blocks.