Created
July 29, 2012 17:41
-
-
Save mharju/3200531 to your computer and use it in GitHub Desktop.
Is this good?
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
(defmacro play-chord | |
[ts notes] | |
(let [note-on (map #(list 'sampled-piano %) (eval notes))] | |
`(at ~ts ~@note-on))) | |
(play-chord (+ 1000 (now)) (chord :A4 :major7)) | |
; expands to | |
(overtone.live/at | |
(+ 1000 (now)) | |
(sampled-piano 69) | |
(sampled-piano 73) | |
(sampled-piano 76) | |
(sampled-piano 80)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment