hdf-0.7: Help/Graphs/lfo-modulation.lhs
lfo modulation (jmcc)
> import Control.Monad
> import Sound.DF
> let { dpl f p q = liftM2 (,) (f p) (f q)
> ; mk_p f = liftM (\o -> o * 3600.0 + 4000.0) (sin_osc f 0.0) }
> in do { s <- liftM (\o -> o * 80.0 + 160.0) (sin_osc 0.05 0.0)
> ; (p1, p2) <- dpl mk_p 0.6 0.7
> ; l <- liftM (\o -> o * 0.05) (lf_pulse s 0 0.4)
> ; (r1, r2) <- dpl (\x -> rlpf l x 0.2) p1 p2
> ; c1 <- buf_comb_n 0 r1 0.20 2.0
> ; c2 <- buf_comb_n 1 r2 0.25 2.0
> ; audition [b_alloc 0 44100, b_alloc 1 44100] (out2 (c1, c2)) }
let { o = fSinOsc kr 0.05 0 * 80 + 160
; p = fSinOsc kr (mce2 0.6 0.7) 0 * 3600 + 4000
; s = rlpf (lfPulse ar o 0 0.4 * 0.05) p 0.2 }
in audition (out 0 (combL s 0.3 (mce2 0.2 0.25) 2))