 
 (defonce buf (buffer 44100)) ;; create a buffer to store the audio 
 
-(def snare (sample (freesound-path 26903))) 
+(def snare (sample (freesound-path 26903)))
+(def snare (sample (freesound-path 68447))) 
 
-(def snare-buf (load-sample (freesound-path 26903))) 
+(def samp-buf (load-sample (freesound-path 68447))) 
 
   ;; ============================================
   ;; buffer fun

  (:require [clojure.core.matrix :as mat])
  (:require [mikera.image.core :as img])
  (:require [mikera.image.colours :as col])
  (:import [mikera.matrixx Matrix AMatrix])
  (:import [java.awt.image BufferedImage]))



(defn fft-matrix [^doubles arr]
  (let [n (count arr)
        length 8192   ;; length of FFT window
        half-length (quot length 2)
        height (min 400 (quot half-length 2))
        fft (mikera.matrixx.algo.FFT. (int length))
        tarr (double-array (* 2 length))
        stride 100
        ts (quot (- n length) stride)
        result-array (double-array (* height ts))]
    (dotimes [i ts]
      (System/arraycopy arr (* i stride) tarr 0 length)
      (.realForward fft tarr)
      (dotimes [j height]
        (aset result-array (+ i (* j ts)) 
              (mag (aget tarr (* j 2)) (aget tarr (inc (* j 2)))))))
    (Matrix/wrap height ts result-array)))

(defn colour ^long [^double val]
  (let [lval (* (inc (Math/log val)) 0.9)]
