       (map #(+ %1 bias) [0 level (* level sustain) 0])
       [attack decay release] curve 2)))
 
-(defunk asr
+(defunk-env asr
   "Create an attack sustain release envelope sutable for use with the env-gen
   ugen"
   [attack 0.01 sustain 1 release 1 curve -4]

      (map #(+ %1 bias) [0 0 level (* level sustain) 0])
      [delay-t attack decay release] curve)))

(defunk adsr
  "Create an attack decay sustain release envelope
  suitable for use as the envelope parameter of the
  env-gen ugen.

              (concat [(first levels) (count durations) release-node loop-node]
                      (interleave (rest levels) durations shape-ids curve-ids))))))

(defmacro defunk-env [fn-name docstring args & body]
  `(do

     (defunk ~(symbol (str "env-" fn-name)) ~docstring ~args ~@body)
     (defunk ~fn-name ~docstring ~args ~@body)
     ))

(defunk-env triangle
  "Create a triangle envelope description array suitable for use with the
  env-gen ugen"
  [dur 1 level 1]
