 (ns klangmeister.synthesis)
 
 ; Plumbing
+
+(defn run
+  "Convert a node (actually a reader fn) into a concrete audio node by supplying context and timing."
+  [node context at duration]
+  (node context at duration))
 
 (defn destination [context at duration]
   (.-destination context))

  "Plug an input into an audio parameter,
  accepting both numbers and ugens."
  (if (fn? input)
    (.connect (input context at duration) param)
    (.setValueAtTime param input at)))

(defn gain [level]

    (let [maximum 5]
      (doto (.createDelay context maximum)
        (-> .-delayTime (plug time context at duration))))))
