Skip to content

Instantly share code, notes, and snippets.

View mydoghasworms's full-sized avatar

Martin Ceronio mydoghasworms

View GitHub Profile
@alandipert
alandipert / midi.clj
Created March 31, 2010 12:37
Play music with Clojure and javax.sound.midi
(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)))
@mydoghasworms
mydoghasworms / json_util.abap
Last active February 19, 2023 14:46
ABAP Utility class for mapping JSON to ABAP data and vice versa - Rather use https://gist.github.com/mydoghasworms/4888a832e28491c3fe47
* 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,