blob: ed2d464d8a1b260be83693cf6818036d22ce2884 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
(ns scratch
(:require [midi :as midi]
[missionary.core :as m]))
#_(print-all-midi-devices)
(def midi-keyboard "CoreMIDI4J - Minilab3 MIDI")
(def run
(midi/<bus midi-keyboard
(fn [v]
(m/ap
;; 2 is the number of message types, e.g. :key
(let [[t f] (m/?> 2 (midi/keyboard v))]
[t (rest (m/?< f))])))))
#_
(def cancel
(run prn prn))
#_
(cancel)
|