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
* Rather use https://gist.github.com/mydoghasworms/4888a832e28491c3fe47 | |
* The alternative is a better parser although it is not an emmitter) | |
*----------------------------------------------------------------------* | |
* CLASS json_util DEFINITION | |
*----------------------------------------------------------------------* | |
class json_util definition. | |
public section. | |
class-methods: | |
data_to_json importing data type any | |
returning value(json) type string, |
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
(import '(javax.sound.midi MidiSystem Synthesizer)) | |
(defn play-note [synth channel note-map] | |
(let [{:keys [note velocity duration] | |
:or {note 60 | |
velocity 127 | |
duration 1000}} note-map] | |
(. channel noteOn note velocity) | |
(Thread/sleep duration) | |
(. channel noteOff note))) |