(bind-func static atkrel_env_follow_c
(lambda (atk:SAMPLE rel:SAMPLE)
(let ((y1 0.0)
(atkcoeff (/ 1000. (* atk (convert SAMPLE_RATE))))
(relcoeff (/ 1000. (* rel (convert SAMPLE_RATE)))))
(lambda (x)
(set! y1 (+ x (* (if (> x y1) atkcoeff relcoeff) (- y1 x))))
y1))))