 (defn percussive [attack decay]
   (line [attack 1.0] [decay 0.0]))
 
+
+; Combinators
+
 (defn connect
   [ugen1 ugen2]
   (fn [context at duration]

      (doto (.createDelay context maximum)
        (-> .-delayTime (plug time context at duration))))))

(defn destination [context at duration]
  (.-destination context))

(defn add [& ugens]
  (fn [context at duration]
    (let [sink ((gain 1.0) context at duration)]
      (doseq [ugen ugens]
        (.connect (ugen context at duration) sink))
      sink)))

  (fn [context at duration]
    (doto (.createGain context)
      (-> .-gain (plug level context at duration)))))


; Envelopes

(defn line
  "Build a line out of [dx y] coordinates, starting at [0 0]."
