|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Classes | |
| struct | Frame |
Functions | |
| float | exp_mod (float base, float mod, float depth, float lo=20.0f, float hi=20000.0f) |
| void | exp_mod_block (const float *mod, float *freq_out, uint16_t n, float base, float depth, float lo=20.0f, float hi=20000.0f) |
|
inline |
Apply exponential modulation to a base frequency (scalar).
Converts a normalized modulation signal to a frequency via: freq = base * 2^(mod * depth)
At depth = 2.0 and mod = 1.0, output is base * 4 (2 octaves up). At depth = 2.0 and mod = -1.0, output is base / 4 (2 octaves down). The relationship is perceptually uniform — equal mod deltas produce equal musical intervals regardless of the base frequency.
| base | Center frequency in Hz (e.g., filter cutoff) |
| mod | Normalized modulation value, typically [-1.0, 1.0] |
| depth | Modulation depth in octaves (e.g., 2.0 = ±2 octaves) |
| lo | Minimum output frequency in Hz (default 20) |
| hi | Maximum output frequency in Hz (default 20000) |
Definition at line 49 of file exp_mod.hpp.
References sbl::dsp::fast_exp2f().
Referenced by exp_mod_block(), and sbl::widgets::proc::Svf::process_modulated().
|
inline |
Apply exponential modulation to an entire block (buffer version).
Writes modulated frequencies to freq_out[] for each sample. Use this when you need the frequency buffer for direct coefficient computation (e.g., feeding into a filter's set_cutoff per-sample).
| mod | Normalized modulation signal buffer [-1.0, 1.0] |
| freq_out | Output frequency buffer (Hz) |
| n | Frame count |
| base | Center frequency in Hz |
| depth | Modulation depth in octaves |
| lo | Minimum output frequency in Hz (default 20) |
| hi | Maximum output frequency in Hz (default 20000) |
Definition at line 70 of file exp_mod.hpp.
References exp_mod().