Sound stops playing after 3-6 minutes

76 views
Skip to first unread message

Benjamin Kushigian

unread,
Oct 4, 2020, 12:41:26 PM10/4/20
to Overtone
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

Hlöðver Sigurðsson

unread,
Oct 4, 2020, 4:50:44 PM10/4/20
to Overtone
I'm at almost 400 and it's still producing sound. I'm using strange window manager so I can't use your freesound sample (java can't recognize my browser). I'm running using external scsynth. This is surely strange, try another sample perhaps? Or different way of starting overtone. Also info about your os would be helpful.

(ns dev.bug
  (:use [overtone.live]))

(definst kick [] (play-buf 1 (load-sample "/home/hlolli/samples/jb/000.wav")))
(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))


Reply all
Reply to author
Forward
0 new messages