M src/js/KronosClass.js +0 -1
@@ 298,7 298,6 @@ var GlobalPauseMode = false;
if (setter || ticker) {
if (type === "%i") {
inst["SetParam"][method] = (function(data) {
- console.log(method, data);
this.InBuf.I32(1)[0] = data;
setter && setter(this.InBuf.ptr);
ticker && ticker(this.InstancePtr, this.OutBuf.ptr, 1);
M src/veneer/midi.cljs +3 -2
@@ 31,7 31,7 @@
(aset input "onmidimessage" #(recv (.-data %))))
(defn activate []
- (if (.-requestMIDIAccess js/navigator)
+ (when (.-requestMIDIAccess js/navigator)
(println "[WebMIDI] Supported")
(.. js/navigator
requestMIDIAccess
@@ 47,4 47,5 @@
(subscribe (.-port e)))))
(.. -inputs
(forEach subscribe))))
- js/console.warning))))
No newline at end of file
+ (fn [error]
+ (println "[WebMIDI] Permission refused: " error))))))
No newline at end of file
M src/veneer/patcher/expr.cljs +5 -3
@@ 119,7 119,7 @@
(let [st (bit-and 0xff (bit-shift-right word 16))
a (bit-and 0xff (bit-shift-right word 8))
b (bit-and 0xff word)
- bar (get bar-graph (js/Math.round (/ b (/ 127 9))))]
+ bar (get bar-graph (js/Math.round (/ b (/ 127 8))))]
(into
[:span.expression
{:style
@@ 131,9 131,11 @@
["⮟" (midi-note a) " " bar]
["⮝" (midi-note a) " "])
0xa0 ["☟" (midi-note a) " " bar]
- 0xb0 ["🎚" a " " bar]
+ 0xb0 ["cc" a " " bar]
0xc0 ["☟ " a]
- 0xd0 ["🕹" (- (+ a (bit-shift-left b 7)) 0x2000)]
+ 0xe0 ["🕹" (.padStart
+ (str (- (+ a (bit-shift-left b 7)) 0x2000))
+ 5)]
;default
[(.toString st 16) a b]))))