# HG changeset patch # User Robert McIntyre # Date 1336130328 18000 # Node ID 9a20581477c27b934eee51f788da1b1415a66d93 # Parent 39606593020844977226c928f776bdd366cf76c5# Parent 9a7fae5afd8f02ebf2e8ebebe107e33c2f7ec6ef merge dylan's changes. diff -r 9a7fae5afd8f -r 9a20581477c2 clojure/com/aurellem/run/music.clj --- a/clojure/com/aurellem/run/music.clj Wed May 02 20:32:45 2012 -0500 +++ b/clojure/com/aurellem/run/music.clj Fri May 04 06:18:48 2012 -0500 @@ -11,6 +11,16 @@ (def third-kind (File. "/home/r/proj/midi/third-kind.mid")) +(def pony + (File. "/home/r/proj/vba-clojure/music/pony-title.mid")) + +(def sync-test + (File. "/home/r/proj/vba-clojure/music/sync-test.mid")) + +(def drum-test + (File. "/home/r/proj/vba-clojure/music/drum-test.mid")) + + (defn raw-midi-text [#^File midi-file] (:out (clojure.java.shell/sh @@ -170,8 +180,9 @@ "Read the message which starts at the current value of HL and do what it says. Duration is left in A, and HL is advanced appropraitely." - ([] (do-message 0x16)) - ([sound-base-address] + ([] (do-message 0x16 1)) + ([sound-base-address wave-duty] + (assert (<= 0 wave-duty 3)) (let [switch [0x2A ;; load message code into A, increment HL @@ -183,7 +194,11 @@ :note-length] play-note - [0x2A ;; load volume/frequency-high info + [0x3E ;; set wave-duty + (bit-shift-left wave-duty 6) + 0xE0 + sound-base-address + 0x2A ;; load volume/frequency-high info 0xF5 ;; push A 0xE6 (Integer/parseInt "11110000" 2) ;; volume mask @@ -203,6 +218,22 @@ {:note-length (count play-note)} (concat switch play-note))))) +(defn play-noise + "read [noise-code, volume, duration] and play the noise. Duration is left in + A, and HL is advanced appropraitely." + ([] + [0x2A ;; load noise-code into A + 0xE0 + 0x22 ;; write noise-code + + 0x2A ;; load volume + 0xE0 + 0x21 ;; write volume + + 0x2A] ;; load duration into A + )) + + ;; (defn play-note ;; "Play the note referenced by HL in the appropiate channel. ;; Leaves desired-duration in A." @@ -226,7 +257,7 @@ ;; 0x2A ;; load duration ;; ]) -(defn music-step [sound-base-address] +(defn music-step [sound-base-address wave-duty noise?] ;; C == current-ticks ;; A == desired-ticks @@ -254,10 +285,14 @@ ;; if desired-ticks = current ticks ;; go to next note ; set current set ticks to 0. - 0x20 - (+ (count (do-message 0)) 2) - - (do-message sound-base-address) + (if noise? + [0x20 + (+ 2 (count (play-noise))) + (play-noise)] + + [0x20 + (+ (count (do-message 0 0)) 2) + (do-message sound-base-address wave-duty)]) 0x0E 0x00 ;; 0->C (current-ticks) @@ -273,7 +308,7 @@ (def music-1 0x11) (def music-2 0x16) -(defn music-kernel [] +(defn music-kernel [wave-duty-1 wave-duty-2] (flatten [;; global initilization section (clear-music-registers) @@ -313,26 +348,38 @@ 0xE5 ;; push HL + ;; initialize frame 3 (noise) + 0x21 + 0x00 + 0xA9 ;; 0xA9OO -> HL + + 0xF5 ;; push AF + 0xC5 ;; push CB + 0xE5 ;; push HL + ;; main music loop - 0xE8 ;; SP + 6; activate frame 1 - 6 - (music-step music-1) - ;;(repeat (count (music-step music-1)) 0x00) + 0xE8 ;; SP + 12; activate frame 1 + 12 + (music-step music-1 wave-duty-1 false) 0xE8 ;; SP - 6; activate frame 2 (->signed-8-bit -6) - ;;(repeat (count (music-step music-2)) 0x00) - (music-step music-2) - + (music-step music-2 wave-duty-2 false) + + 0xE8 ;; SP - 6; activate frame 3 + (->signed-8-bit -6) + (music-step nil nil true) 0x18 (->signed-8-bit (+ ;; two music-steps - (- (* 2 (count (music-step 0)))) + (- (* 2 (count (music-step 0 0 false)))) + (- (count (music-step nil nil true))) -2 ;; this jump instruction -2 ;; activate frame 1 -2 ;; activate frame 2 + -2 ;; activate frame 3 ))])) (defn frequency-code->frequency @@ -395,15 +442,35 @@ [command s] (filter #(= command (:command %)) s)) -(defn midi-track->mini-midi [#^File midi-file track-num] - (let [midi-events (parse-midi midi-file) +(defn track-info [#^File midi-file] + (let [events (parse-midi midi-file) + track-titles (commands :Title_t events) + track-info + (map #(read-string (read-string (:args %))) track-titles) + track-map + (zipmap track-info track-titles)] + track-map)) + +(defn target-tracks + "return the track-numbers in the form [voice-0 voice-1 noise]" + [#^File midi-file] + (let [track-data (track-info midi-file) + track-order + (zipmap (map :out (keys track-data)) + (vals track-data)) + channel-nums (map (comp :channel track-order) (range 3))] + channel-nums)) + +(defn midi-track->abstract-mini-midi + [#^File midi-file track-num] + (let [midi-events (parse-midi midi-file) note-on-events (commands :Note_on_c midi-events) note-off-events (commands :Note_off_c midi-events) select-channel (fn [n s] - (sort-by :time (filter #(= n (:channel (:args %))) s))) + (sort-by :time (filter #(= n (:channel %)) s))) channel-on (select-channel track-num note-on-events) @@ -418,6 +485,7 @@ (map (fn [note-on note-off] {:frequency (midi-code->frequency (:note (:args note-on))) + :midi-code (:note (:args note-on)) :duration (/ (* (/ tempo division) (- (:time note-off) (:time note-on))) @@ -439,36 +507,117 @@ notes) notes-with-silence - (filter (comp not zero? :duration) - (interleave silences notes))] + (concat + (filter (comp not zero? :duration) + (interleave silences notes)) + [(silence 3)])] + notes-with-silence)) + +(defn midi-track->mini-midi-voice [#^File midi-file track-num] + (let [abstract-mini-midi + (midi-track->abstract-mini-midi midi-file track-num)] + (map + (fn [note-event] + (note-codes (:frequency note-event) + (:volume note-event) + (int (* (:duration note-event) 0x100)))) + abstract-mini-midi))) + +(def midi-code->gb-noise-code + {nil 0xFF + 35 87 + 38 20 + 39 0 + }) + + +(defn noise-codes [code volume duration] + (assert (<= 0 volume 0xF)) + (if (<= duration 0xFF) + [(midi-code->gb-noise-code code code) + (bit-shift-left volume 4) + duration] + (vec + (flatten + [(noise-codes code volume 0xFF) + (noise-codes code volume (- duration 0xFF))])))) + +(defn midi-track->mini-midi-noise [#^File midi-file track-num] + (let [abstract-mini-midi + (midi-track->abstract-mini-midi midi-file track-num)] (map - (fn [note-event] - (note-codes (:frequency note-event) - (:volume note-event) - (int (* (:duration note-event) 0x100)))) - notes-with-silence))) + (fn [noise-event] + (noise-codes (:midi-code noise-event) + (:volume noise-event) + (int (* (:duration noise-event) 0x100)))) + abstract-mini-midi))) + (defn midi->mini-midi [#^File midi-file] - {:track-1 (flatten (midi-track->mini-midi midi-file 1)) - :track-2 (flatten (midi-track->mini-midi midi-file 2))}) + (let [targets (target-tracks midi-file) + duty-info (keys (track-info midi-file))] + + {:voice-1 (midi-track->mini-midi-voice midi-file (nth targets 0)) + :voice-2 (midi-track->mini-midi-voice midi-file (nth targets 1)) + :noise (midi-track->mini-midi-noise midi-file (nth targets 2)) + :duty (zipmap (map :out duty-info) + (map #(get % :duty 0) duty-info))})) (defn play-midi [#^File midi-file] - (let [track-1-target 0xA000 - track-2-target 0xB000 + (let [voice-1-target 0xA000 + voice-2-target 0xB000 + noise-target 0xA900 program-target 0xC000 mini-midi (midi->mini-midi midi-file) - long-silence (flatten (note-codes 20 0 9001))] + long-silence (flatten (note-codes 20 0 20001)) + long-noise-silence + (interleave (range 500) (repeat 0x00) (repeat 255)) + + voice-1 (flatten (:voice-1 mini-midi)) + wave-duty-1 ((:duty mini-midi) 0 0) + + voice-2 (flatten (:voice-2 mini-midi)) + wave-duty-2 ((:duty mini-midi) 1 0) + + noise (flatten (:noise mini-midi)) + ] (-> (second (music-base)) - (set-memory-range track-1-target long-silence) - (set-memory-range track-2-target long-silence) - (set-memory-range track-1-target (:track-1 mini-midi)) - (set-memory-range track-2-target (:track-2 mini-midi)) - (set-memory-range program-target (music-kernel)) + (set-memory-range voice-1-target long-silence) + (set-memory-range voice-2-target long-silence) + (set-memory-range noise-target long-noise-silence) + (set-memory-range voice-1-target voice-1) + (set-memory-range voice-2-target voice-2) + (set-memory-range noise-target noise) + (set-memory-range + program-target + (music-kernel wave-duty-1 wave-duty-2)) (PC! program-target)))) +(defn test-noise [] + (let [noise-pattern + (concat (interleave (range 0x100) (repeat 0xF0) (repeat 255)) + (interleave (range 10) (repeat 0x00) (repeat 255)))] + + (-> (second (music-base)) + (set-memory-range 0xA900 (flatten noise-pattern)) + (set-memory-range 0xC000 (music-kernel 0 0)) + (PC! 0xC000)))) - +(defn test-play-noise [noise-code] + (Thread/sleep 300) + (println "playing noise:" noise-code) + (run-moves + (let [noise-pattern + (interleave (repeat 10 noise-code) (repeat 0xF0) (repeat 255))] + (-> (second (music-base)) + (set-memory-range 0xA900 (flatten noise-pattern)) + (set-memory-range 0xC000 (music-kernel 0 0)) + (PC! 0xC000))) + (repeat 20 []))) + +(defn test-all-noises [] + (dorun (map test-play-noise (range 0x100)))) (def C4 (partial note-codes 261.63)) (def D4 (partial note-codes 293.66)) @@ -498,19 +647,6 @@ (set-memory-range music-target music-bytes) (PC! program-target)))) - - -;; (defn test-note [music-bytes] -;; (-> (set-memory-range (second (music-base)) -;; 0xC000 (concat (clear-music-registers) -;; (play-note) -;; (infinite-loop))) -;; (set-memory-range 0xD000 music-bytes) -;; (PC! 0xC000) -;; (HL! 0xD000) -;; )) - - (defn run-program ([program] (let [target 0xC000] diff -r 9a7fae5afd8f -r 9a20581477c2 music/Friendship is Magic (MLP Theme Song).mid Binary file music/Friendship is Magic (MLP Theme Song).mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/Friendship is Magic (MLP Theme Song).rg Binary file music/Friendship is Magic (MLP Theme Song).rg has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/My Very Best Friends Trombone by Golden Glissando.mid Binary file music/My Very Best Friends Trombone by Golden Glissando.mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/My Very Best Friends.mid Binary file music/My Very Best Friends.mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/My Very Best Friends2.mid Binary file music/My Very Best Friends2.mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/Orchestral is AWESTUM.mid Binary file music/Orchestral is AWESTUM.mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/drum-test.mid Binary file music/drum-test.mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/drum-test.rg Binary file music/drum-test.rg has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/pony-offset.mid Binary file music/pony-offset.mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/pony-title.csv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/music/pony-title.csv Fri May 04 06:18:48 2012 -0500 @@ -0,0 +1,549 @@ +0, 0, Header, 1, 4, 480 +1, 0, Start_track +1, 0, Copyright_t, "rlm" +1, 0, Cue_point_t, "Created by Rosegarden" +1, 0, Cue_point_t, "http://www.rosegardenmusic.com/" +1, 0, Tempo, 250000 +1, 0, Time_signature, 4, 2, 24, 8 +1, 55680, End_track +2, 0, Start_track +2, 0, Title_t, "{:voice 0 :duty 2}" +2, 0, Control_c, 0, 91, 0 +2, 0, Control_c, 0, 10, 64 +2, 0, Control_c, 0, 7, 100 +2, 0, Control_c, 0, 93, 0 +2, 0, Control_c, 0, 7, 100 +2, 0, Control_c, 0, 10, 64 +2, 0, Note_on_c, 0, 66, 80 +2, 0, Control_c, 0, 121, 0 +2, 0, Control_c, 0, 93, 30 +2, 0, Program_c, 0, 19 +2, 0, Control_c, 0, 93, 30 +2, 0, Control_c, 0, 91, 30 +2, 0, Control_c, 0, 91, 30 +2, 0, Control_c, 0, 7, 100 +2, 0, Control_c, 0, 10, 64 +2, 420, Note_on_c, 0, 69, 80 +2, 420, Note_off_c, 0, 66, 127 +2, 840, Note_on_c, 0, 66, 80 +2, 840, Note_off_c, 0, 69, 127 +2, 1260, Note_off_c, 0, 66, 127 +2, 1260, Note_on_c, 0, 64, 80 +2, 2100, Note_on_c, 0, 69, 80 +2, 2100, Note_off_c, 0, 64, 127 +2, 3360, Note_on_c, 0, 62, 80 +2, 3360, Note_off_c, 0, 69, 127 +2, 3780, Note_on_c, 0, 64, 80 +2, 3780, Note_off_c, 0, 62, 127 +2, 4200, Note_on_c, 0, 62, 80 +2, 4200, Note_off_c, 0, 64, 127 +2, 4620, Note_on_c, 0, 61, 80 +2, 4620, Note_off_c, 0, 62, 127 +2, 5460, Note_on_c, 0, 57, 80 +2, 5460, Note_off_c, 0, 61, 127 +2, 6720, Note_on_c, 0, 59, 80 +2, 6720, Note_off_c, 0, 57, 127 +2, 7560, Note_on_c, 0, 61, 80 +2, 7560, Note_off_c, 0, 59, 127 +2, 8400, Note_on_c, 0, 62, 80 +2, 8400, Note_off_c, 0, 61, 127 +2, 9240, Note_on_c, 0, 64, 80 +2, 9240, Note_off_c, 0, 62, 127 +2, 10080, Note_on_c, 0, 62, 80 +2, 10080, Note_off_c, 0, 64, 127 +2, 11040, Note_on_c, 0, 61, 80 +2, 11040, Note_off_c, 0, 62, 127 +2, 11280, Note_on_c, 0, 62, 80 +2, 11280, Note_off_c, 0, 61, 127 +2, 11760, Note_on_c, 0, 64, 80 +2, 11760, Note_off_c, 0, 62, 127 +2, 12240, Note_on_c, 0, 62, 80 +2, 12240, Note_off_c, 0, 64, 127 +2, 13920, Note_off_c, 0, 62, 127 +2, 14160, Note_on_c, 0, 66, 80 +2, 14280, Note_off_c, 0, 66, 127 +2, 14400, Note_on_c, 0, 66, 80 +2, 14520, Note_off_c, 0, 66, 127 +2, 14640, Note_on_c, 0, 66, 80 +2, 14760, Note_off_c, 0, 66, 127 +2, 14880, Note_on_c, 0, 66, 80 +2, 15360, Note_on_c, 0, 62, 80 +2, 15360, Note_off_c, 0, 66, 127 +2, 15600, Note_on_c, 0, 64, 80 +2, 15600, Note_off_c, 0, 62, 127 +2, 16080, Note_on_c, 0, 62, 80 +2, 16080, Note_off_c, 0, 64, 127 +2, 16560, Note_on_c, 0, 66, 80 +2, 16560, Note_off_c, 0, 62, 127 +2, 17280, Note_on_c, 0, 64, 80 +2, 17280, Note_off_c, 0, 66, 127 +2, 17760, Note_on_c, 0, 62, 80 +2, 17760, Note_off_c, 0, 64, 127 +2, 18720, Note_on_c, 0, 61, 80 +2, 18720, Note_off_c, 0, 62, 127 +2, 18960, Note_on_c, 0, 62, 80 +2, 18960, Note_off_c, 0, 61, 127 +2, 19440, Note_on_c, 0, 64, 80 +2, 19440, Note_off_c, 0, 62, 127 +2, 19920, Note_on_c, 0, 62, 80 +2, 19920, Note_off_c, 0, 64, 127 +2, 20760, Note_off_c, 0, 62, 127 +2, 21120, Note_on_c, 0, 62, 80 +2, 21360, Note_on_c, 0, 64, 80 +2, 21360, Note_off_c, 0, 62, 127 +2, 21600, Note_off_c, 0, 64, 127 +2, 21600, Note_on_c, 0, 66, 80 +2, 21840, Note_on_c, 0, 69, 80 +2, 21840, Note_off_c, 0, 66, 127 +2, 22320, Note_off_c, 0, 69, 127 +2, 22510, Note_on_c, 0, 69, 80 +2, 22990, Note_off_c, 0, 69, 127 +2, 23040, Note_on_c, 0, 66, 80 +2, 23280, Note_on_c, 0, 64, 80 +2, 23280, Note_off_c, 0, 66, 127 +2, 23760, Note_on_c, 0, 62, 80 +2, 23760, Note_off_c, 0, 64, 127 +2, 24000, Note_on_c, 0, 66, 80 +2, 24000, Note_off_c, 0, 62, 127 +2, 24480, Note_on_c, 0, 64, 80 +2, 24480, Note_off_c, 0, 66, 127 +2, 25440, Note_off_c, 0, 64, 127 +2, 25920, Note_on_c, 0, 62, 80 +2, 26040, Note_off_c, 0, 62, 127 +2, 26160, Note_on_c, 0, 62, 80 +2, 26280, Note_off_c, 0, 62, 127 +2, 26400, Note_on_c, 0, 62, 80 +2, 26880, Note_on_c, 0, 66, 80 +2, 26880, Note_off_c, 0, 62, 127 +2, 27360, Note_on_c, 0, 69, 80 +2, 27360, Note_off_c, 0, 66, 127 +2, 27600, Note_on_c, 0, 71, 80 +2, 27600, Note_off_c, 0, 69, 127 +2, 28080, Note_on_c, 0, 69, 80 +2, 28080, Note_off_c, 0, 71, 127 +2, 29040, Note_on_c, 0, 64, 80 +2, 29040, Note_off_c, 0, 69, 127 +2, 29160, Note_off_c, 0, 64, 127 +2, 29280, Note_on_c, 0, 64, 80 +2, 29400, Note_off_c, 0, 64, 127 +2, 29520, Note_on_c, 0, 64, 80 +2, 29640, Note_off_c, 0, 64, 127 +2, 29760, Note_on_c, 0, 64, 80 +2, 30000, Note_off_c, 0, 64, 127 +2, 30240, Note_on_c, 0, 64, 80 +2, 30480, Note_off_c, 0, 64, 127 +2, 30720, Note_on_c, 0, 64, 80 +2, 30960, Note_off_c, 0, 64, 127 +2, 31200, Note_on_c, 0, 64, 80 +2, 31440, Note_on_c, 0, 66, 80 +2, 31440, Note_off_c, 0, 64, 127 +2, 31920, Note_on_c, 0, 64, 80 +2, 31920, Note_off_c, 0, 66, 127 +2, 32640, Note_off_c, 0, 64, 127 +2, 33120, Note_on_c, 0, 62, 80 +2, 33360, Note_on_c, 0, 64, 80 +2, 33360, Note_off_c, 0, 62, 127 +2, 33840, Note_on_c, 0, 66, 80 +2, 33840, Note_off_c, 0, 64, 127 +2, 34320, Note_on_c, 0, 62, 80 +2, 34320, Note_off_c, 0, 66, 127 +2, 34440, Note_off_c, 0, 62, 127 +2, 34560, Note_on_c, 0, 62, 80 +2, 34800, Note_on_c, 0, 66, 80 +2, 34800, Note_off_c, 0, 62, 127 +2, 35040, Note_on_c, 0, 69, 80 +2, 35040, Note_off_c, 0, 66, 127 +2, 35280, Note_off_c, 0, 69, 127 +2, 35280, Note_on_c, 0, 71, 80 +2, 35760, Note_on_c, 0, 69, 80 +2, 35760, Note_off_c, 0, 71, 127 +2, 36480, Note_on_c, 0, 62, 80 +2, 36480, Note_off_c, 0, 69, 127 +2, 36960, Note_off_c, 0, 62, 127 +2, 36960, Note_on_c, 0, 64, 80 +2, 37200, Note_off_c, 0, 64, 127 +2, 37440, Note_on_c, 0, 64, 80 +2, 37680, Note_off_c, 0, 64, 127 +2, 37920, Note_on_c, 0, 64, 80 +2, 38400, Note_on_c, 0, 66, 80 +2, 38400, Note_off_c, 0, 64, 127 +2, 38880, Note_on_c, 0, 71, 80 +2, 38880, Note_off_c, 0, 66, 127 +2, 39360, Note_on_c, 0, 69, 80 +2, 39360, Note_off_c, 0, 71, 127 +2, 39480, Note_off_c, 0, 69, 127 +2, 39600, Note_on_c, 0, 69, 80 +2, 39960, Note_off_c, 0, 69, 127 +2, 40080, Note_on_c, 0, 67, 80 +2, 40320, Note_on_c, 0, 69, 100 +2, 40320, Note_off_c, 0, 67, 127 +2, 40560, Note_off_c, 0, 69, 127 +2, 40800, Note_on_c, 0, 62, 80 +2, 41760, Note_on_c, 0, 61, 80 +2, 41760, Note_off_c, 0, 62, 127 +2, 42000, Note_off_c, 0, 61, 127 +2, 42000, Note_on_c, 0, 62, 80 +2, 42480, Note_on_c, 0, 64, 80 +2, 42480, Note_off_c, 0, 62, 127 +2, 42960, Note_on_c, 0, 62, 80 +2, 42960, Note_off_c, 0, 64, 127 +2, 43920, Note_off_c, 0, 62, 127 +2, 44160, Note_on_c, 0, 62, 80 +2, 44400, Note_off_c, 0, 62, 127 +2, 44400, Note_on_c, 0, 64, 80 +2, 44640, Note_off_c, 0, 64, 127 +2, 44640, Note_on_c, 0, 66, 80 +2, 45120, Note_on_c, 0, 62, 80 +2, 45120, Note_off_c, 0, 66, 127 +2, 45360, Note_on_c, 0, 67, 80 +2, 45360, Note_off_c, 0, 62, 127 +2, 46080, Note_on_c, 0, 66, 80 +2, 46080, Note_off_c, 0, 67, 127 +2, 46560, Note_on_c, 0, 64, 80 +2, 46560, Note_off_c, 0, 66, 127 +2, 47040, Note_off_c, 0, 64, 127 +2, 47040, Note_on_c, 0, 62, 80 +2, 47520, Note_on_c, 0, 66, 80 +2, 47520, Note_off_c, 0, 62, 127 +2, 48480, Note_off_c, 0, 66, 127 +2, 48480, Note_on_c, 0, 62, 100 +2, 55680, Note_off_c, 0, 62, 127 +2, 55680, End_track +3, 0, Start_track +3, 0, Title_t, "{:voice 1 :duty 3}" +3, 0, Program_c, 1, 18 +3, 0, Control_c, 1, 7, 100 +3, 0, Control_c, 1, 91, 30 +3, 0, Control_c, 1, 93, 0 +3, 0, Control_c, 1, 10, 64 +3, 0, Control_c, 1, 10, 64 +3, 0, Control_c, 1, 121, 0 +3, 0, Control_c, 1, 7, 100 +3, 0, Control_c, 1, 91, 0 +3, 0, Control_c, 1, 93, 30 +3, 6720, Note_on_c, 1, 62, 100 +3, 7560, Note_on_c, 1, 64, 100 +3, 7560, Note_off_c, 1, 62, 127 +3, 8400, Note_on_c, 1, 66, 100 +3, 8400, Note_off_c, 1, 64, 127 +3, 9240, Note_on_c, 1, 67, 100 +3, 9240, Note_off_c, 1, 66, 127 +3, 10080, Note_on_c, 1, 38, 80 +3, 10080, Note_off_c, 1, 67, 127 +3, 10800, Note_off_c, 1, 38, 127 +3, 11040, Note_on_c, 1, 38, 80 +3, 11760, Note_on_c, 1, 40, 80 +3, 11760, Note_off_c, 1, 38, 127 +3, 12000, Note_off_c, 1, 40, 127 +3, 12240, Note_on_c, 1, 40, 80 +3, 12480, Note_off_c, 1, 40, 127 +3, 12720, Note_on_c, 1, 40, 80 +3, 12840, Note_off_c, 1, 40, 127 +3, 12960, Note_on_c, 1, 40, 80 +3, 13920, Note_on_c, 1, 47, 80 +3, 13920, Note_off_c, 1, 40, 127 +3, 14640, Note_off_c, 1, 47, 127 +3, 14880, Note_on_c, 1, 47, 80 +3, 15600, Note_on_c, 1, 45, 80 +3, 15600, Note_off_c, 1, 47, 127 +3, 15840, Note_off_c, 1, 45, 127 +3, 16080, Note_on_c, 1, 45, 80 +3, 16320, Note_off_c, 1, 45, 127 +3, 16560, Note_on_c, 1, 45, 80 +3, 16680, Note_off_c, 1, 45, 127 +3, 16800, Note_on_c, 1, 45, 80 +3, 17760, Note_on_c, 1, 38, 80 +3, 17760, Note_off_c, 1, 45, 127 +3, 18480, Note_off_c, 1, 38, 127 +3, 18720, Note_on_c, 1, 38, 80 +3, 19440, Note_on_c, 1, 40, 80 +3, 19440, Note_off_c, 1, 38, 127 +3, 19680, Note_off_c, 1, 40, 127 +3, 19920, Note_on_c, 1, 40, 80 +3, 20160, Note_off_c, 1, 40, 127 +3, 20400, Note_on_c, 1, 40, 80 +3, 20520, Note_off_c, 1, 40, 127 +3, 20640, Note_on_c, 1, 40, 80 +3, 21600, Note_on_c, 1, 47, 80 +3, 21600, Note_off_c, 1, 40, 127 +3, 22320, Note_off_c, 1, 47, 127 +3, 22560, Note_on_c, 1, 47, 80 +3, 23280, Note_on_c, 1, 45, 80 +3, 23280, Note_off_c, 1, 47, 127 +3, 23520, Note_off_c, 1, 45, 127 +3, 23760, Note_on_c, 1, 45, 80 +3, 24000, Note_off_c, 1, 45, 127 +3, 24240, Note_on_c, 1, 45, 80 +3, 24360, Note_off_c, 1, 45, 127 +3, 24480, Note_on_c, 1, 45, 80 +3, 24960, Note_off_c, 1, 45, 127 +3, 25440, Note_on_c, 1, 43, 80 +3, 25920, Note_off_c, 1, 43, 127 +3, 27360, Note_on_c, 1, 47, 80 +3, 27840, Note_off_c, 1, 47, 127 +3, 29280, Note_on_c, 1, 45, 80 +3, 29760, Note_off_c, 1, 45, 127 +3, 32640, Note_on_c, 1, 45, 80 +3, 33120, Note_on_c, 1, 43, 80 +3, 33120, Note_off_c, 1, 45, 127 +3, 33600, Note_off_c, 1, 43, 127 +3, 35040, Note_on_c, 1, 47, 80 +3, 35520, Note_off_c, 1, 47, 127 +3, 36960, Note_on_c, 1, 45, 80 +3, 37680, Note_off_c, 1, 45, 127 +3, 37920, Note_on_c, 1, 45, 80 +3, 38400, Note_off_c, 1, 45, 127 +3, 38640, Note_on_c, 1, 45, 80 +3, 38880, Note_off_c, 1, 45, 127 +3, 39120, Note_on_c, 1, 45, 80 +3, 39600, Note_off_c, 1, 45, 127 +3, 39840, Note_on_c, 1, 45, 80 +3, 40080, Note_off_c, 1, 45, 127 +3, 40320, Note_on_c, 1, 45, 80 +3, 40800, Note_on_c, 1, 38, 80 +3, 40800, Note_off_c, 1, 45, 127 +3, 41520, Note_off_c, 1, 38, 127 +3, 41760, Note_on_c, 1, 38, 80 +3, 42240, Note_off_c, 1, 38, 127 +3, 42480, Note_on_c, 1, 40, 80 +3, 42720, Note_off_c, 1, 40, 127 +3, 42960, Note_on_c, 1, 40, 80 +3, 43200, Note_off_c, 1, 40, 127 +3, 43440, Note_on_c, 1, 40, 80 +3, 43560, Note_off_c, 1, 40, 127 +3, 43680, Note_on_c, 1, 40, 80 +3, 44640, Note_off_c, 1, 40, 127 +3, 44640, Note_on_c, 1, 47, 80 +3, 45360, Note_off_c, 1, 47, 127 +3, 45600, Note_on_c, 1, 47, 80 +3, 46320, Note_off_c, 1, 47, 127 +3, 46320, Note_on_c, 1, 45, 80 +3, 46560, Note_off_c, 1, 45, 127 +3, 46800, Note_on_c, 1, 45, 80 +3, 47040, Note_off_c, 1, 45, 127 +3, 47280, Note_on_c, 1, 45, 80 +3, 47400, Note_off_c, 1, 45, 127 +3, 47520, Note_on_c, 1, 45, 80 +3, 48000, Note_off_c, 1, 45, 127 +3, 48480, Note_on_c, 1, 43, 80 +3, 49440, Note_on_c, 1, 45, 80 +3, 49440, Note_off_c, 1, 43, 127 +3, 50400, Note_off_c, 1, 45, 127 +3, 50400, Note_on_c, 1, 47, 80 +3, 51360, Note_on_c, 1, 49, 80 +3, 51360, Note_off_c, 1, 47, 127 +3, 52320, Note_off_c, 1, 49, 127 +3, 52320, Note_on_c, 1, 38, 100 +3, 55680, Note_off_c, 1, 38, 127 +3, 55680, End_track +4, 0, Start_track +4, 0, Title_t, "drums" +4, 0, Control_c, 9, 10, 64 +4, 0, Control_c, 9, 7, 100 +4, 0, Control_c, 9, 7, 100 +4, 0, Control_c, 9, 91, 0 +4, 0, Control_c, 9, 7, 100 +4, 0, Control_c, 9, 93, 30 +4, 0, Control_c, 9, 93, 0 +4, 0, Control_c, 9, 10, 64 +4, 0, Control_c, 9, 93, 30 +4, 0, Control_c, 9, 121, 0 +4, 0, Control_c, 9, 91, 30 +4, 0, Program_c, 9, 0 +4, 0, Control_c, 9, 32, 0 +4, 0, Control_c, 9, 91, 30 +4, 0, Control_c, 9, 0, 1 +4, 0, Control_c, 9, 10, 64 +4, 10080, Note_on_c, 9, 35, 80 +4, 10558, Note_off_c, 9, 35, 127 +4, 10560, Note_on_c, 9, 38, 80 +4, 11038, Note_off_c, 9, 38, 127 +4, 11040, Note_on_c, 9, 35, 80 +4, 11518, Note_off_c, 9, 35, 127 +4, 11520, Note_on_c, 9, 38, 80 +4, 11759, Note_off_c, 9, 38, 127 +4, 11760, Note_on_c, 9, 35, 80 +4, 12238, Note_off_c, 9, 35, 127 +4, 12240, Note_on_c, 9, 35, 80 +4, 12478, Note_off_c, 9, 35, 127 +4, 12480, Note_on_c, 9, 38, 80 +4, 12958, Note_off_c, 9, 38, 127 +4, 12960, Note_on_c, 9, 35, 80 +4, 13198, Note_off_c, 9, 35, 127 +4, 13200, Note_on_c, 9, 35, 80 +4, 13439, Note_off_c, 9, 35, 127 +4, 13440, Note_on_c, 9, 38, 80 +4, 13918, Note_off_c, 9, 38, 127 +4, 13920, Note_on_c, 9, 35, 80 +4, 14398, Note_off_c, 9, 35, 127 +4, 14400, Note_on_c, 9, 38, 80 +4, 14878, Note_off_c, 9, 38, 127 +4, 14880, Note_on_c, 9, 35, 80 +4, 15358, Note_off_c, 9, 35, 127 +4, 15360, Note_on_c, 9, 38, 80 +4, 15599, Note_off_c, 9, 38, 127 +4, 15600, Note_on_c, 9, 35, 80 +4, 16078, Note_off_c, 9, 35, 127 +4, 16080, Note_on_c, 9, 35, 80 +4, 16318, Note_off_c, 9, 35, 127 +4, 16320, Note_on_c, 9, 38, 80 +4, 16798, Note_off_c, 9, 38, 127 +4, 16800, Note_on_c, 9, 35, 80 +4, 17038, Note_off_c, 9, 35, 127 +4, 17040, Note_on_c, 9, 35, 80 +4, 17279, Note_off_c, 9, 35, 127 +4, 17280, Note_on_c, 9, 38, 80 +4, 17758, Note_off_c, 9, 38, 127 +4, 17760, Note_on_c, 9, 35, 80 +4, 18238, Note_off_c, 9, 35, 127 +4, 18240, Note_on_c, 9, 38, 80 +4, 18718, Note_off_c, 9, 38, 127 +4, 18720, Note_on_c, 9, 35, 80 +4, 19198, Note_off_c, 9, 35, 127 +4, 19200, Note_on_c, 9, 38, 80 +4, 19439, Note_off_c, 9, 38, 127 +4, 19440, Note_on_c, 9, 35, 80 +4, 19918, Note_off_c, 9, 35, 127 +4, 19920, Note_on_c, 9, 35, 80 +4, 20158, Note_off_c, 9, 35, 127 +4, 20160, Note_on_c, 9, 38, 80 +4, 20638, Note_off_c, 9, 38, 127 +4, 20640, Note_on_c, 9, 35, 80 +4, 20878, Note_off_c, 9, 35, 127 +4, 20880, Note_on_c, 9, 35, 80 +4, 21119, Note_off_c, 9, 35, 127 +4, 21120, Note_on_c, 9, 38, 80 +4, 21598, Note_off_c, 9, 38, 127 +4, 21600, Note_on_c, 9, 35, 80 +4, 22078, Note_off_c, 9, 35, 127 +4, 22080, Note_on_c, 9, 38, 80 +4, 22558, Note_off_c, 9, 38, 127 +4, 22560, Note_on_c, 9, 35, 80 +4, 23038, Note_off_c, 9, 35, 127 +4, 23040, Note_on_c, 9, 38, 80 +4, 23279, Note_off_c, 9, 38, 127 +4, 23280, Note_on_c, 9, 35, 80 +4, 23758, Note_off_c, 9, 35, 127 +4, 23760, Note_on_c, 9, 35, 80 +4, 23998, Note_off_c, 9, 35, 127 +4, 24000, Note_on_c, 9, 38, 80 +4, 24478, Note_off_c, 9, 38, 127 +4, 24480, Note_on_c, 9, 35, 80 +4, 24718, Note_off_c, 9, 35, 127 +4, 24720, Note_on_c, 9, 35, 80 +4, 24959, Note_off_c, 9, 35, 127 +4, 24960, Note_on_c, 9, 38, 80 +4, 25438, Note_off_c, 9, 38, 127 +4, 25440, Note_on_c, 9, 35, 80 +4, 25918, Note_off_c, 9, 35, 127 +4, 27360, Note_on_c, 9, 35, 80 +4, 27838, Note_off_c, 9, 35, 127 +4, 29280, Note_on_c, 9, 35, 80 +4, 29758, Note_off_c, 9, 35, 127 +4, 33120, Note_on_c, 9, 35, 80 +4, 33598, Note_off_c, 9, 35, 127 +4, 33600, Note_on_c, 9, 39, 80 +4, 34078, Note_off_c, 9, 39, 127 +4, 34560, Note_on_c, 9, 39, 80 +4, 35038, Note_off_c, 9, 39, 127 +4, 35040, Note_on_c, 9, 35, 80 +4, 35518, Note_off_c, 9, 35, 127 +4, 35520, Note_on_c, 9, 39, 80 +4, 35998, Note_off_c, 9, 39, 127 +4, 36480, Note_on_c, 9, 39, 80 +4, 36958, Note_off_c, 9, 39, 127 +4, 36960, Note_on_c, 9, 35, 80 +4, 37438, Note_off_c, 9, 35, 127 +4, 37440, Note_on_c, 9, 39, 80 +4, 37918, Note_off_c, 9, 39, 127 +4, 38400, Note_on_c, 9, 39, 80 +4, 38878, Note_off_c, 9, 39, 127 +4, 38880, Note_on_c, 9, 38, 80 +4, 39120, Note_on_c, 9, 38, 80 +4, 39120, Note_on_c, 9, 38, 80 +4, 39120, Note_off_c, 9, 38, 127 +4, 39360, Note_off_c, 9, 38, 127 +4, 39360, Note_on_c, 9, 39, 100 +4, 39600, Note_off_c, 9, 39, 127 +4, 39600, Note_on_c, 9, 38, 80 +4, 39840, Note_off_c, 9, 38, 127 +4, 39840, Note_on_c, 9, 38, 100 +4, 40080, Note_off_c, 9, 38, 127 +4, 40080, Note_on_c, 9, 38, 80 +4, 40318, Note_off_c, 9, 38, 127 +4, 40320, Note_on_c, 9, 39, 80 +4, 40560, Note_off_c, 9, 39, 127 +4, 40560, Note_on_c, 9, 38, 80 +4, 40800, Note_off_c, 9, 38, 127 +4, 40800, Note_on_c, 9, 35, 80 +4, 41278, Note_off_c, 9, 35, 127 +4, 41280, Note_on_c, 9, 38, 80 +4, 41758, Note_off_c, 9, 38, 127 +4, 41760, Note_on_c, 9, 35, 80 +4, 42238, Note_off_c, 9, 35, 127 +4, 42240, Note_on_c, 9, 38, 80 +4, 42479, Note_off_c, 9, 38, 127 +4, 42480, Note_on_c, 9, 35, 80 +4, 42958, Note_off_c, 9, 35, 127 +4, 42960, Note_on_c, 9, 35, 80 +4, 43198, Note_off_c, 9, 35, 127 +4, 43200, Note_on_c, 9, 38, 80 +4, 43678, Note_off_c, 9, 38, 127 +4, 43680, Note_on_c, 9, 35, 80 +4, 43918, Note_off_c, 9, 35, 127 +4, 43920, Note_on_c, 9, 35, 80 +4, 44159, Note_off_c, 9, 35, 127 +4, 44160, Note_on_c, 9, 38, 80 +4, 44638, Note_off_c, 9, 38, 127 +4, 44640, Note_on_c, 9, 35, 80 +4, 45118, Note_off_c, 9, 35, 127 +4, 45120, Note_on_c, 9, 38, 80 +4, 45598, Note_off_c, 9, 38, 127 +4, 45600, Note_on_c, 9, 35, 80 +4, 46078, Note_off_c, 9, 35, 127 +4, 46080, Note_on_c, 9, 38, 80 +4, 46320, Note_on_c, 9, 35, 80 +4, 46320, Note_off_c, 9, 38, 127 +4, 46798, Note_off_c, 9, 35, 127 +4, 46800, Note_on_c, 9, 35, 80 +4, 47040, Note_on_c, 9, 38, 80 +4, 47040, Note_off_c, 9, 35, 127 +4, 47518, Note_off_c, 9, 38, 127 +4, 47520, Note_on_c, 9, 35, 80 +4, 47758, Note_off_c, 9, 35, 127 +4, 47760, Note_on_c, 9, 35, 80 +4, 47999, Note_off_c, 9, 35, 127 +4, 48000, Note_on_c, 9, 38, 80 +4, 48238, Note_off_c, 9, 38, 127 +4, 48240, Note_on_c, 9, 38, 80 +4, 48478, Note_off_c, 9, 38, 127 +4, 48480, Note_on_c, 9, 35, 80 +4, 48958, Note_off_c, 9, 35, 127 +4, 48960, Note_on_c, 9, 38, 80 +4, 49198, Note_off_c, 9, 38, 127 +4, 49200, Note_on_c, 9, 38, 80 +4, 49438, Note_off_c, 9, 38, 127 +4, 49440, Note_on_c, 9, 35, 80 +4, 49918, Note_off_c, 9, 35, 127 +4, 49920, Note_on_c, 9, 38, 80 +4, 50158, Note_off_c, 9, 38, 127 +4, 50160, Note_on_c, 9, 38, 80 +4, 50398, Note_off_c, 9, 38, 127 +4, 50400, Note_on_c, 9, 35, 80 +4, 50878, Note_off_c, 9, 35, 127 +4, 50880, Note_on_c, 9, 38, 80 +4, 51118, Note_off_c, 9, 38, 127 +4, 51120, Note_on_c, 9, 38, 80 +4, 51358, Note_off_c, 9, 38, 127 +4, 51360, Note_on_c, 9, 35, 80 +4, 51599, Note_off_c, 9, 35, 127 +4, 51600, Note_on_c, 9, 38, 80 +4, 51838, Note_off_c, 9, 38, 127 +4, 51840, Note_on_c, 9, 38, 80 +4, 52078, Note_off_c, 9, 38, 127 +4, 52080, Note_on_c, 9, 38, 80 +4, 52318, Note_off_c, 9, 38, 127 +4, 52320, Note_on_c, 9, 38, 80 +4, 52798, Note_off_c, 9, 38, 127 +4, 55680, End_track +0, 0, End_of_file diff -r 9a7fae5afd8f -r 9a20581477c2 music/pony-title.mid Binary file music/pony-title.mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/sync-test.mid Binary file music/sync-test.mid has changed diff -r 9a7fae5afd8f -r 9a20581477c2 music/sync-test.rg Binary file music/sync-test.rg has changed