 (defn normalise-beat-info
   [beat]
   (cond
-   (= 0 beat)         nil
-   (= 1 beat)         {}
-   (map? beat)        beat
-   (sequential? beat) beat
-   :else              {}))
+    (= 0 beat)         nil
+    (= 1 beat)         {}
+    (map? beat)        beat
+    (sequential? beat) beat
+    :else              {}))
 
 (defn schedule-pattern
   [curr-t pat-dur sound pattern]

  (let [new-t (+ curr-t pat-dur)]
    (apply-by new-t #'live-sequencer [new-t pat-dur live-patterns])))

(def a {:rate 100 :amp 0.4 :time-scale-max 5})
(def a {:rate 2 :amp 0.1 :time-scale-max 5})
(def b {:pan -1 :freq 1000})
(def c {:freq 25000 :amp 0.2})
(def d {:amp 5.0 :dur 0.25})
(def g {:freq-mul 1})

(metro :bpm 110)
(volume 0.5)
(metro :bpm)

;;(def metro (metronome 128))
(def one-beat-dur (/ 60.0 110))
(def one-bar-dur (* one-beat-dur 4))
(def beat-per-pattern 4)
(def dur-per-pattern (* beat-per-pattern one-beat-dur))

;; (def kick (sample "resources/kick.wav"))
;; (kick)

(comment
  (odoc line)
  (odoc asr)
  (odoc buf-rd)
  (odoc phasor)
  (odoc bpz2)
  (odoc latch)
  (odoc buf-rate-scale)
  (odoc buf-dur))

(definst grumble [freq 440 freq-mul 1 speed 10 attack 10 release 50]
  (let [snd (mix (map #(* (lf-cub (* % freq-mul freq))
