 
 (fact "Clapping Music is minimal."
   (definitional description-length clapping-music) => 228
-  (result-length (->> (clapping-music) (take-while #(-> % :time (< 216))))) => 99151)
+  (result-length (->> (clapping-music) (take-while #(-> % :time (< 216))))) => 99416)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; The Library of Babel ;;;

;;; Arrangement ;;;
;;;;;;;;;;;;;;;;;;;

(defmethod live/play-note :clap1 [_]
  ((sample "samples/click2.wav")))

(defmethod live/play-note :clap2 [_]
  ((sample "samples/select-click.wav")))

(defmethod live/play-note :default
  [{midi :pitch seconds :duration}]

  (let [african-bell-pattern (rhythm [1/8 1/8 1/4 1/8 1/4 1/4 1/8 1/4])]
    (->> african-bell-pattern forever (all :part :clap1)
         (canon
           #(->> % (take 32) (then (rhythm [1/8])) forever (all :part :clap2))))))

(comment
  (live/play (clapping-music))
