Created
September 4, 2015 23:47
-
-
Save devn/691aa4f98912ea144468 to your computer and use it in GitHub Desktop.
playing midi notes from overtone to ableton, reason, etc. using MIDI Patchbay
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
;; 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