;; stereo flanger (quadrature)
(bind-func static flanger_st_c
(lambda ()
(let ((ms (* .001 SRf))
(halfsrf (* 0.5 SRf))
(combl (comb_c (convert SRf)))
(combr (comb_c (convert SRf)))
(modl (osc_c 0.0))
(modr (osc_c 0.25)))
(lambda (chan:i64 x:SAMPLE in out low high rate feedback)
(if (= chan 0)
(combl x
(+ (* ms low)
(clamp (* ms high (+ 0.5 (modl 0.5 rate)))
0.0 halfsrf))
in out feedback)
(if (= chan 1)
(combr x
(+ (* ms low)
(clamp (* ms high (+ 0.5 (modr 0.5 rate)))
0.0 halfsrf))
in out feedback)
0.0))))))