   (Thread/sleep 1000)
   (stop))
 
-(def arr (into-array Double/TYPE (buffer-read snare-buf)))
+(def arr (into-array Double/TYPE (buffer-read samp-buf)))
 
 (defn mag 
   (^double [^double a ^double b]


(defonce buf (buffer 44100)) ;; create a buffer to store the audio 

(def snare (sample (freesound-path 26903))) 

(def snare-buf (load-sample (freesound-path 26903))) 

  ;; ============================================
  ;; buffer fun

          h (.getHeight bi)]
      (dotimes [x w]
        (dotimes [y h]
          (.setRGB bi (int x) (- (dec h) (int y)) (unchecked-int (spec/heatmap (* 0.01 (.get M (int y) (int x))) ))))))
    bi))

(def M (fft-matrix arr))

(defn demo-code []
  
  (img/show (render M)))