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
__vec-get-i-- local untyped vec read, returns the int64_t slot at index i.__vec-len-i-- local untyped vec length read.__apply-sf-- apply one SF to a signal, returning the resulting signal.__chain-loop-- threading recursion for effects-chain.