Mercurial > vba-clojure
diff clojure/com/aurellem/run/music.clj @ 455:1c10fa8366a7
synchronized pony song.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 03 May 2012 10:28:05 -0500 |
parents | bf87b87a4ad7 |
children | 9c192737034d |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/run/music.clj Thu May 03 07:25:06 2012 -0500 1.2 +++ b/clojure/com/aurellem/run/music.clj Thu May 03 10:28:05 2012 -0500 1.3 @@ -11,7 +11,12 @@ 1.4 (def third-kind 1.5 (File. "/home/r/proj/midi/third-kind.mid")) 1.6 1.7 -(def pony "/home/r/proj/vba-clojure/music/pony-title.mid") 1.8 +(def pony 1.9 + (File. "/home/r/proj/vba-clojure/music/pony-title.mid")) 1.10 + 1.11 +(def sync-test 1.12 + (File. "/home/r/proj/vba-clojure/music/sync-test.mid")) 1.13 + 1.14 1.15 (defn raw-midi-text [#^File midi-file] 1.16 (:out 1.17 @@ -451,8 +456,8 @@ 1.18 notes-with-silence))) 1.19 1.20 (defn midi->mini-midi [#^File midi-file] 1.21 - {:track-1 (flatten (midi-track->mini-midi midi-file 1)) 1.22 - :track-2 (flatten (midi-track->mini-midi midi-file 2))}) 1.23 + {:track-1 (flatten (midi-track->mini-midi midi-file 0)) 1.24 + :track-2 (flatten (midi-track->mini-midi midi-file 1))}) 1.25 1.26 (defn play-midi [#^File midi-file] 1.27 (let [track-1-target 0xA000 1.28 @@ -469,9 +474,6 @@ 1.29 (set-memory-range program-target (music-kernel)) 1.30 (PC! program-target)))) 1.31 1.32 - 1.33 - 1.34 - 1.35 (def C4 (partial note-codes 261.63)) 1.36 (def D4 (partial note-codes 293.66)) 1.37 (def E4 (partial note-codes 329.63))