(bind-func dsp:DSP
(let ((o1 (osc_mc_c 0.0))
(o2 (osc_mc_c 0.0))
(o3 (osc_mc_c 0.0))
(o4 (osc_mc_c 0.0))
(o5 (osc_mc_c 0.0))
(o6 (osc_mc_c 0.0))
(o7 (osc_mc_c 0.0))
(o8 (osc_mc_c 0.0)))
(lambda (in time chan dat)
;; modulate a bunch of the granulators params
(gran1.iot (+ 5000 (ftoi64 (o1 chan 4800.0 0.1398))))
(gran1.rlo (ftod (+ 1.0 (o2 chan 0.5 0.2))))
(gran1.rhi (ftod (+ 1.0 (o3 chan 0.5 0.25))))
(gran1.dlo (ftod (+ 4000.0 (o4 chan 3900.0 0.125))))
(gran1.dhi (ftod (+ 4000.0 (o5 chan 3900.0 0.1))))
(gran1.plo (+ 0.5 (o6 chan 0.5 0.123)))
(gran1.phi (+ 0.5 (o7 chan 0.5 0.235)))
;; loop through audio file (change gran1.wet to adjust amount of input)
(* 3.0 (gran1 chan time (AudioBuffer_read_looped abuf1 chan))))))