Skip to content

Instantly share code, notes, and snippets.

Created November 26, 2013 22:41
Show Gist options
  • Save anonymous/7667634 to your computer and use it in GitHub Desktop.
Save anonymous/7667634 to your computer and use it in GitHub Desktop.
(ns doremi_script_clojure.core
[doremi_script_clojure.to_lilypond :refer [to-lilypond]]
[clojure.java.io :refer [input-stream resource]]
[clojure.data.json :as json]
[clojure.pprint :refer [pprint]]
))
(defn -json_text_to_lilypond[txt]
"Takes parsed doremi-script json data as text"
"Returns lilypond text"
(to-lilypond (json/read-str txt)))
;;
(ns doremi_script_clojure.to_lilypond
(:require
[clojure.pprint :refer [pprint]]
[clabango.parser :refer [render]]
[clojure.java.io :refer [resource]]
[clojure.string :refer [split lower-case]]
))
(defn to-lilypond[x]
"Takes parsed doremi-script and returns lilypond text"
(render (-> "lilypond_templates/lilypond.txt" resource slurp) x))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment