;; assuming a mic is connected to input 1 (i.e. 0)
(bind-func dsp:DSP
(let ((dly (delay_st_c (/ SR 4) (/ SR 6)))
(micamp 0.0))
(lambda (in time chan dat)
(Rec ;; record everything when (Rec.rec > 0)
(dly chan
(cond ((= chan 0)
(+ (sampler in time chan dat)
(* micamp (pref dat 0))))
((= chan 1)
(+ (sampler in time chan dat)
(* micamp (pref dat 0))))
(else 0.0:f))
0.5 0.5)))))