;; chorus
(bind-func static chorus_c
(lambda (phase:SAMPLE)
(let ((delay:SAMPLE 700.)
(range:SAMPLE 200.)
(rate:SAMPLE 0.1)
(comb1 (comb_c (convert (+ delay (* 2.5 range)))))
(comb2 (comb_c (convert (+ delay (* 2.5 range)))))
(comb3 (comb_c (convert (+ delay (* 2.5 range)))))
(mrng1 range)
(mrng2 (* (random) range))
(mrng3 (* (random) range))
(mrte1 rate)
(mrte2 (* rate 1.372))
(mrte3 (* rate 0.792))
(dly1 delay)
(dly2 (+ 200.0 (* (random) delay)))
(dly3 (+ 200.0 (* (random) delay)))
(mod1 (osc_c 0.0))
(mod2 (osc_c (* 0.5 (random))))
(mod3 (osc_c (* 1.0 (random)))))
(lambda (x:SAMPLE in out fb)
(+ (comb1 x (+ dly1 (mod1 mrng1 mrte1) out fb) in out fb)
(comb2 x (+ dly2 (mod2 mrng2 mrte2) out fb) in out fb)
(comb3 x (+ dly3 (mod3 mrng3 mrte3) out fb) in out fb))))))