env-wrap   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/core/extempore_lang.xtm

Implementation

;; 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)))))


Back to Index