Expand description
Vector operations for batch audio processing.
Each op has two code paths: an inline Rust fallback (always available) and a
host-accelerated import (used when sesh_vec_version() > 0). The SDK selects
the path at runtime. Plugin authors call the same functions regardless of platform.
Structs§
- Biquad
State - Internal state for a biquad filter (two-sample history).
- Envelope
State - Internal state for an envelope follower.
Enums§
- Envelope
Mode - Envelope follower detection mode.
- Filter
Type - Biquad filter type.
- Waveform
- Oscillator waveform shape.
Functions§
- vec_abs
- Absolute value:
dst[i] = |src[i]|. - vec_add
- Element-wise addition:
dst[i] = a[i] + b[i]. - vec_
add_ scalar - Add scalar to every element:
dst[i] += value. - vec_
biquad - Biquad filter with per-sample modulation of cutoff, Q, and gain.
- vec_
clamp - Clamp:
dst[i] = clamp(src[i], min, max). - vec_
copy - Copy
srcintodst. - vec_
delay_ read - Per-sample modulated delay read with linear interpolation.
- vec_div
- Element-wise division:
dst[i] = a[i] / b[i]. - vec_
envelope - Envelope follower. Tracks amplitude of
srcwith attack/release smoothing. - vec_
fill - Fill
dstwith a constant value. - vec_
hard_ clip - Hard clipping: clamp
srcto±threshold[i]. - vec_mul
- Element-wise multiplication:
dst[i] = a[i] * b[i]. - vec_
mul_ add - Multiply and accumulate:
dst[i] += src[i] * gain. - vec_
mul_ scalar - Multiply every element by scalar:
dst[i] *= value. - vec_neg
- Negate:
dst[i] = -src[i]. Phase inversion. - vec_osc
- Fill
dstwith oscillator output. Advances*phase.freqis in Hz. - vec_pow
- Element-wise power:
dst[i] = src[i].powf(exp[i]). - vec_
recip - Reciprocal:
dst[i] = 1.0 / src[i]. - vec_
ring_ read - Read
dst.len()contiguous samples from circular buffer atpos - offset, wrapping. - vec_
ring_ write - Write
srcinto circular bufferbufstarting at*pos, wrapping atbuf.len(). Advances*posbysrc.len(). - vec_
sqrt - Square root:
dst[i] = sqrt(src[i]). - vec_
tanh - Soft saturation:
dst[i] = tanh(src[i] * drive[i]).