signal/compose
src/signal/compose.tur
defn
effects-chain
(effects-chain)
apply a vector of effects in order to an input signal.
Parameters
| effects | Vec of SF (Sample Sample) processors, applied left-to-right | |
| input | source Signal Sample |
Returns
Signal Sample with each effect applied in order. Callers wanting to invoke the result as a closure should re-bind it with `^fat`, e.g. (let [^fat out : (fn [float] #{} float) (effects-chain (vec-of (gain 0.5) (low-pass 0.3)) my-osc)] (out 0.0))
Example
(let [chain (effects-chain (vec-of (gain 0.5) (low-pass 0.3))
(sine 440.0 0.0))]
chain)
Internal definitions
__apply-sf-- apply one SF to a signal, returning the resulting signal.__chain-loop-- The Vec is read with stdlib's `vec-get` / `vec-len` through a