;; modify one of the examples from above
;; adding freq1 and freq2 into closure environment
(bind-func dsp
(let ((osc1 (osc_c 0.0))
(osc2 (osc_c 0.0))
(freq1 220.0)
(freq2 220.0))
(lambda (in:SAMPLE time:i64 channel:i64 data:SAMPLE*)
(cond ((= channel 1) (osc1 0.3 freq1))
((= channel 0) (osc2 0.3 freq2))
(else 0.0)))))