No matching definitions.

signal/filter

src/signal/filter.tur
defn

low-pass

(low-pass [alpha :float])

first-order IIR low-pass filter Signal Function.

alphasmoothing coefficient in (0, 1); lower = more smoothing.

SF Sample Sample. Each instance owns its own state cell, so the same `(low-pass alpha)` SF is stateful from the moment it is applied to an input signal.

((low-pass 0.3) (sine 440.0 0.0))
defn

high-pass

(high-pass [alpha :float])

first-order IIR high-pass filter Signal Function.

alphasmoothing coefficient of the internal low-pass tap
(matches `low-pass`'s convention).

SF Sample Sample emitting `x - low_pass(x)` per sample.

((high-pass 0.3) (sawtooth 110.0))
Internal definitions
__filter_alloc_state-- allocate a zero-initialized double cell.
__filter_lp_step-- low-pass EMA step.
__filter_hp_step-- high-pass step.