 
 (defn- gain-ramp [gain-node level]
   (let [time (.-currentTime (.-context gain-node))]
-    (.linearRampToValueAtTime (.-gain gain-node) level (+ time 0.1))))
+    (.exponentialRampToValueAtTime (.-gain gain-node) level (+ time 0.1))))
 
 (defn- silence [gain-node]
   (gain gain-node 0))
 
 (defn- silence-ramp [gain-node]
-  (gain-ramp gain-node 0))
+  (gain-ramp gain-node 0.0001))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 


    (when duration
      (let [duration-ms (parse-duration duration)]
        (c/set-timeout! clock #(stop-osc osc-impl) duration)))))

(defn play-note 
  "Uses a one-off oscillator to play a note.

  (reduce (fn [timeout {:keys [pitch duration volume] :as note-model}]
            (when pitch
              (c/set-timeout! clock #(play-fn osc-model note-model) timeout))
            (let [duration-ms (parse-duration (or duration 0))] 
              (+ timeout duration-ms)))
          0
          notes))

