(bind-func static hann_e_c
"window of 'width' samples, repeating every 'repeat' samples
with an offset of 'offset' samples"
(lambda ()
(let ((cnt -1))
(lambda (width:i64 offset:i64 repeat:i64)
(if (> cnt repeat) (set! cnt -1))
(set! cnt (+ cnt 1))
(if (and (or (> cnt offset) (= offset 0))
(< cnt (+ width offset)))
(* 0.5
(- 1.0
(cos (/ (* STWOPI (convert (% (- cnt offset) width)))
(convert (- width 1))))))
0.0)))))