;; slightly more complex example
(bind-func dsp
(let ((oscs:|9,[SAMPLE,SAMPLE,SAMPLE]*|* (zalloc))
(i 0))
(dotimes (i 9)
(aset! oscs i (osc_c 0.0)))
(lambda (a:SAMPLE b:i64 c:i64 d:SAMPLE*)
(cond ((= c 0) ;; left channel
(+ ((aref oscs 0) (+ 0.3 ((aref oscs 2) 0.2 1.0)) 60.0)
((aref oscs 3) 0.2 220.0)
((aref oscs 4) 0.2 (+ 400. ((aref oscs 5) 200. .1)))
((aref oscs 6) 0.1 900.0)))
((= c 1) ;; right channel
((aref oscs 7) 0.3 (+ 220.0 ((aref oscs 8) 110.0 20.0))))
(else 0.0))))) ;; any remaining channels