   (:require [klangmeister.music :as music]))
 
 (defonce context (js/window.AudioContext.))
-
 
 (defn perc [at attack decay]
   (let [node (.createGain context)]

      (.linearRampToValueAtTime 1 (+ at attack))
      (.linearRampToValueAtTime 0 (+ at attack decay)))
    node))

(defn bell! [midi start dur]
  (let [freq (music/equal-temperament midi)

      (-> .-type  (set! "sawtooth"))
      (.start start)
      (.stop (+ start 1.5))
      (connect (vol 0.8) envelope (.-destination context)))))
