Every time I get a good groove going the sound stops. If I run (stop) and then start playing again, everything works. Here is a minimal example that stops running:
(ns lp.instruments)
(use 'overtone.live)
(definst kick [] (play-buf 1 (load-sample (freesound-path 2086))))
(def metro (metronome 100))
(defn player [beat]
(println (str "beat " (str beat)))
(at (metro beat) (kick :freq (+ 120 (* 10 (mod beat 8)))))
(apply-by (metro (inc beat)) #'player (inc beat) []))
(player (metro))
At first I thought there was some tail recursion stuff happening, but even after sound stops the beats happily keep being printed.
Is there something obvious I'm doing wrong?
clojure: 1.10.1
overtone: 0.10.6
Thanks for your help,
b