Mercurial > vba-clojure
diff clojure/com/aurellem/run/music.clj @ 496:a6d060a64246
pixel introspection. but entire image is upside down.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 11 Jun 2012 06:04:25 -0500 |
parents | 346b91ae503a |
children | 2de44c6184ee |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/run/music.clj Mon Jun 11 00:55:51 2012 -0500 1.2 +++ b/clojure/com/aurellem/run/music.clj Mon Jun 11 06:04:25 2012 -0500 1.3 @@ -450,7 +450,7 @@ 1.4 ;; want: seconds 1.5 1.6 1.7 -(defn silence [length] 1.8 +(defn silent-note [length] 1.9 {:frequency 1 1.10 :duration length 1.11 :volume 0}) 1.12 @@ -518,9 +518,9 @@ 1.13 (let [note-1-space (- (:time-stamp note-2) 1.14 (:time-stamp note-1)) 1.15 note-1-length (:duration note-1)] 1.16 - (silence (- note-1-space note-1-length)))) 1.17 + (silent-note (- note-1-space note-1-length)))) 1.18 ;; to handle silence at the beginning. 1.19 - (concat [(assoc (silence 0) 1.20 + (concat [(assoc (silent-note 0) 1.21 :time-stamp 0)] notes) 1.22 notes) 1.23 1.24 @@ -528,7 +528,7 @@ 1.25 (concat 1.26 (filter (comp not zero? :duration) 1.27 (interleave silences notes)) 1.28 - [(silence 3)])] 1.29 + [(silent-note 3)])] 1.30 notes-with-silence)) 1.31 1.32 (defn midi-track->mini-midi-voice [#^File midi-file track-num]