Skip to content

Instantly share code, notes, and snippets.

@devn
Created September 4, 2015 23:47
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devn/691aa4f98912ea144468 to your computer and use it in GitHub Desktop.
Save devn/691aa4f98912ea144468 to your computer and use it in GitHub Desktop.
playing midi notes from overtone to ableton, reason, etc. using MIDI Patchbay
;; http://notahat.com/midi_patchbay/
;; Create a virtual input and virtual output in MIDI patchbay
;; input name: "Overtone"
;; output name: "yourchoice"
;; In Reason, Ableton, etc. select "yourchoice"
;; as the midi input for a channel.
(ns jam.core
(:use [overtone.live]))
(def device-name "Overtone")
(def midi-out
(->> (midi-connected-receivers)
(filter #(= device-name (:name %)))
(first)))
(defn play-mary-had-a-little-lamb! []
(doseq [note [68 66 64 66 68 68 68
66 66 66 68 71 71
68 66 64 66 68 68 68
66 66 68 66 64]]
(midi-note midi-out note 127 500)
(Thread/sleep 500)))
(play-mary-had-a-little-lamb!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment