Created
October 11, 2013 15:48
-
-
Save fdb/6937118 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use 'overtone.live) | |
(def rkick-id (int (rand 10000))) | |
(def rsnare-id (int (rand 10000))) | |
(println "Kick id " rkick-id) | |
(println "Snare id " rsnare-id) | |
(def rkick (sample (freesound-path rkick-id))) | |
(def rsnare (sample (freesound-path rsnare-id))) | |
(def metro (metronome 80)) | |
(defn player [beat] | |
(at (metro beat) (rkick)) | |
(at (metro (+ 0.5 beat)) (rsnare)) | |
(apply-at (metro (inc beat)) #'player (inc beat) [])) | |
(player (metro)) | |
(stop) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment