;; make a convenience wrapper
(bind-func env-wrap
(let ((points 3)
(data:double* (zalloc (* points 2))))
(pointer-set! data 0 0.0) ;; point data
(pset! data 1 0.0)
(pset! data 2 2.0)
(pset! data 3 1.0)
(pset! data 4 4.0)
(pset! data 5 0.0)
(let ((f (envelope_c data points)))
(lambda (time:double)
(f time)))))