;Generate triangular window function of buffer_size N
(bind-func triangular_window_func:[void,float*,i64]*
(lambda (wn:float* N:i64)
(let ((n:i64 0)
(L:i64 (- N 1)))
(dotimes (n N)
(pset! wn n (- 1.0 (fabs (/ (- (i64tof n) (/ (i64tof (- N 1)) 2.0)) (/ (i64tof L) 2.0))))))
void)))