           (+ dx x))
         at
         corners)
-      (section audio-node))))
+      (subgraph audio-node))))
 
 (defn adshr [attack decay sustain hold release]
   (envelope [attack 1.0] [decay sustain] [hold sustain] [release 0]))


; Definitions

(defn section
  ([input output] {:input input :output output})
  ([singleton] (section singleton singleton)))

(defn source
  "A graph of synthesis nodes without an input, so another graph can't connect to it."
  [node]
  (section nil node))

(defn sink
  "A graph of synthesis nodes without an output, so it can't connect to another graph."
  [node]
  (section node nil))

; Plumbing

(defn run-with
  "Convert a synth (actually a reader fn) into a concrete section by supplying context and timing."
  [synth context at duration]
  (synth context at duration))


  (fapply
    (fn [graph1 graph2]
      (.connect (:output graph1) (:input graph2))
      (subgraph (:input graph1) (:output graph2)))
    upstream-synth
    downstream-synth))

