 (defn >>> [& nodes]
   (reduce wire nodes))
 
-(defn oscillate [type freq duration]
+(defn oscillator [type freq duration]
   (fn [at context]
     (doto (.createOscillator context)
       (-> .-frequency .-value (set! freq))
       (-> .-type (set! type))
       (.start at)
       (.stop (+ at duration)))))
+
+(def sin-osc (partial oscillator "sine"))
+(def saw (partial oscillator "sawtooth"))
 
 (defn destination [at context]
   (.-destination context))


(defn bell! [{:keys [time duration pitch]}]
  (let [harmonic (fn [n proportion]
                   (>>> (oscillate "sine" (* n pitch) 1.5)
                        (percuss 0.01 proportion)
                        (volume 0.01)
                        destination))]

      all)))

(defn fuzz! [{:keys [duration pitch]}]
  (>>> (saw pitch 1.5)
       (percuss 0.1 0.5)
       (volume 0.3)
       destination))
