Skip to content

Instantly share code, notes, and snippets.

@mds2
Created February 26, 2015 03:22
Show Gist options
  • Save mds2/dadb227a134f6110fca4 to your computer and use it in GitHub Desktop.
Save mds2/dadb227a134f6110fca4 to your computer and use it in GitHub Desktop.
Overtone/Clojure samples can be played on top of themselves with no clicking.
(use 'overtone.core)
(boot-server)
(def samp1 (sample "power_melody.wav")) ; see http://alumni.soe.ucsc.edu/~mds/amp_testing/power_melody.wav
;;; Play the same sample a bunch of times with overlap
(loop [n-remaining 10 delay-to-use 0]
(after-delay delay-to-use samp1)
(if (> n-remaining 0) (recur (- n-remaining 1) (+ delay-to-use 1800)) '()))
;;; to play the sample once, just enter
;;; (samp1)
;;; at the repl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment