// 49..56 — pads
// 64, 65 — pedals
// 66 — joystick
+// 70, 71 — touchpad
// 73..80 — upper right buttons
// 81..88 — lower right buttons
// 94, 95 — tempo change selector
var <>key;
var <>bend;
var <>mod;
- var <>touch;
+ var <>press;
var <>tempo, bpm=127;
var <>bank;
var <>program;
+ var <>touchx, <>touchy;
+ var <>uprot, <>lowrot, <>fader;
*new {|name='Novation SL25 ReMOTE MKII', midiNames=#["ReMOTE SL", "ReMOTE SL MIDI 1", "ReMOTE SL MIDI 1"], reveal=true|
^super.newCopyArgs(name, midiNames, reveal).midiInit.controlInit;
}, 66, srcID: idin);
// pressure
- MIDIdef.touch((\touch++name).asSymbol, {|...args|
- touch.value(args[0].linlin(0, 127, 0, 1), *args);
+ MIDIdef.touch((\press++name).asSymbol, {|...args|
+ press.value(args[0].linlin(0, 127, 0, 1), *args);
}, srcID: idin);
// tempo
program.value(args[0], *args);
}, srcID: idin);
+ // touchpad
+ MIDIdef.cc((\touchx++name).asSymbol, {|...args|
+ touchx.value(args[0].linlin(0, 127, 0, 1), *args);
+ }, 70, srcID: idin);
+ MIDIdef.cc((\touchy++name).asSymbol, {|...args|
+ touchy.value(args[0].linlin(0, 127, 0, 1), *args);
+ }, 71, srcID: idin);
+
+ // rotators and faders
+ MIDIdef.cc((\uprot++name).asSymbol, {|...args|
+ uprot.value(args[0]-64, args[1]-1, *args);
+ }, (1..8), srcID: idin);
+ MIDIdef.cc((\lowrot++name).asSymbol, {|...args|
+ lowrot.value(args[0].linlin(0, 127, 0, 1), args[1]-9, *args);
+ }, (9..16), srcID: idin);
+ MIDIdef.cc((\fader++name).asSymbol, {|...args|
+ fader.value(args[0].linlin(0, 127, 0, 1), args[1]-17, *args);
+ }, (17..24), srcID: idin);
+
// initialize handlers with revealing code
[
- \key, \bend, \mod, \touch, \tempo, \bank, \program
+ \key, \bend, \mod, \press, \tempo, \bank, \program,
+ \touchx, \touchy, \uprot, \lowrot, \fader
].do{|handlerName|
this.perform((handlerName++\_).asSymbol, {|...args|
this.noCallback(handlerName, *args);
free {
[
- \keyDown, \keyUp, \bend, \mod, \touch, \tempo, \bank, \program
+ \keyDown, \keyUp, \bend, \mod, \press, \tempo, \bank, \program,
+ \touchx, \touchy, \uprot, \lowrot, \fader
].do{|prefix|
var defName = (prefix ++ name).asSymbol;
MIDIdef(defName).free;