diff options
Diffstat (limited to 'src/unheard')
| -rw-r--r-- | src/unheard/instrument/minilab3.clj | 31 | ||||
| -rw-r--r-- | src/unheard/instrument_utils.clj | 13 | ||||
| -rw-r--r-- | src/unheard/midi_util.clj | 4 |
3 files changed, 48 insertions, 0 deletions
diff --git a/src/unheard/instrument/minilab3.clj b/src/unheard/instrument/minilab3.clj new file mode 100644 index 0000000..11da62e --- /dev/null +++ b/src/unheard/instrument/minilab3.clj @@ -0,0 +1,31 @@ +(ns unheard.instrument.minilab3 + (:require [unheard.instrument-utils :as iu])) + +(def minilab3 + {:knobs + {1 [0 74] + 2 [0 71] + 3 [0 76] + 4 [0 77] + 5 [0 93] + 6 [0 18] + 7 [0 19] + 8 [0 16]} + :faders + {1 [0 82] + 2 [0 83] + 3 [0 85] + 4 [0 17]} + :pads + {1 [9 36] + 2 [9 37] + 3 [9 38] + 4 [9 39] + 5 [9 40] + 6 [9 41] + 7 [9 42] + 8 [9 43]}}) + +(def is-knob (iu/is-knob minilab3)) +(def is-fader (iu/is-fader minilab3)) +(def is-pad (iu/is-pad minilab3)) diff --git a/src/unheard/instrument_utils.clj b/src/unheard/instrument_utils.clj new file mode 100644 index 0000000..1ceae6b --- /dev/null +++ b/src/unheard/instrument_utils.clj @@ -0,0 +1,13 @@ +(ns unheard.instrument-utils) + +(defn is-knob [inst] + (fn [n [ch k _v]] + (= [ch k] (get-in inst [:knobs n])))) + +(defn is-fader [inst] + (fn [n [ch k _v]] + (= [ch k] (get-in inst [:faders n])))) + +(defn is-pad [inst] + (fn [n [ch k _v]] + (= [ch k] (get-in inst [:pads n])))) diff --git a/src/unheard/midi_util.clj b/src/unheard/midi_util.clj new file mode 100644 index 0000000..382fe87 --- /dev/null +++ b/src/unheard/midi_util.clj @@ -0,0 +1,4 @@ +(ns unheard.midi-util) + +(defn control-message? [msg-type] + (= :control msg-type)) |
