Created
March 31, 2010 10:44
-
-
Save alandipert/350182 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
(ns org.dipert.xmltunes | |
(:use [org.dipert midi sax])) | |
(def file (java.io.File. "/home/alan/Desktop/dipert_hw2/inventory.xml")) | |
(defn main [] | |
(let [middle-c 60 | |
current-note (atom middle-c)] | |
(play-notes (map #(hash-set :duration 400 | |
:note (condp = (:type %) | |
:start-element (swap! current-note inc) | |
:end-element (swap! current-note dec) | |
:characters @current-note)) | |
(parse-xml file))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment