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

(defn biquad-filter
  ([type freq q]
   (fn [context at duration]
     (section
       (doto (-> (biquad-filter type freq) (run-with context at duration) :output)
         (-> .-Q (plug q context at duration))))))
  ([type freq]
   (fn [context at duration]
     (section
       (doto (.createBiquadFilter context)
         (-> .-frequency .-value (set! 0))
         (-> .-frequency (plug freq context at duration))


; Definitions

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

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

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

; Plumbing

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

