             (js/Array.prototype.reverse.call (.getChannelData buffer 1)))
           ; (.linearRampToValueAtTime (.-gain gain-node) 1 0)
           ; (.linearRampToValueAtTime (.-gain gain-node) 0 5)
-          ; (set! (.-buffer convolve-node) buffer)
+          (set! (.-buffer source) buffer)
           (set! (.-value (.-gain gain-node)) gain)
           (set! (.-value (.-playbackRate source)) rate)
-          (set! (.-buffer source) buffer)
-          (set! (.-type biquad-node) "notch")
-          (set! (.-value (.-frequency biquad-node)) 1000)
-          (set! (.-Q biquad-node) 1)
-          (set! (.-gain biquad-node) 1)
-          (set! (.-curve distort-node) (distortion-curve 400))
-          (set! (.-oversample distort-node) "4x")
-          (.connect source analize-node)
-          (.connect analize-node distort-node)
-          (.connect distort-node biquad-node)
+          ; (set! (.-Q biquad-node) 1)
+          ; (set! (.-gain biquad-node) 1)
+          ; (set! (.-type biquad-node) "notch")
+          ; (set! (.-value (.-frequency biquad-node)) 1000)
+          (.connect source biquad-node)
           (.connect biquad-node gain-node)
-          ; (.connect biquad-node convolve-node)
-          ; (.connect convolve-node gain-node)
           (.connect gain-node (aget ac "destination"))
           (.start source (.-currentTime ac) position)
           (js/setTimeout

    (.send xhr)))

(def url "http://static.kevvv.in/sounds/callmemaybe.mp3")
; (play-clip url 0 100 0.4 true)
; (play-clip url 0 100 0.25 1 false)
(play-clip url 3 6 1 1 false)

; (js/setInterval #(play-clip url 7.1 4 1 1 false) 3000)

; (play-clip url 7.1 0.35)
; (js/setInterval #(play-clip url 7.1 2 2 false) 2000)

; (js/setInterval #(play-clip url 17.1 2.5) 1350)

; Array.prototype.reverse.call(buffer.getChannelData(0))
;       Array.prototype.reverse.call(buffer.getChannelData(1))


(def ac (new window/AudioContext))

(defn play-clip [url position duration rate gain reverse]
  (let [xhr (new window/XMLHttpRequest)
        source (.createBufferSource ac)
        gain-node (.createGain ac)
        biquad-node (.createBiquadFilter ac)]
    (.open xhr "get" url true)
    (set! (.-responseType xhr) "arraybuffer")
    (set! (.-onload xhr) (fn []
