};
//============================== LED control
- MIDIClient.destinations.do({ |item|
- if (item.name == "Ableton Push MIDI 2", {
- push.pushOut = MIDIOut.newByName("Ableton Push", "Ableton Push MIDI 2").latency_(0);
- });
- });
+ try {
+ // linux
+ push.pushOut = MIDIOut.newByName("Ableton Push", "Ableton Push MIDI 2");
+ }{
+ // mac os
+ push.pushOut = MIDIOut.newByName("Ableton Push", "User Port");
+ };
+ push.pushOut.latency_(0);
if (push.pushOut==nil, {"Cannot control push LEDs!"});
-
push.hcPushPadLed = {|zi, row, col, light=3, color=0, whiten=false, mode=0|
if ((col < 0) || (col > 7) || (row < 0) || (row > 7), {}, {
zi.pushOut.noteOn(mode, 36+(row*8)+col, zi.pppc(color, light, whiten));
/* Test incoming MIDI messages from push
(
MIDIdef.cc(\testcc, {|...args|
- (["cc"] ++ args).postln;
+(["cc"] ++ args).postln;
});
MIDIdef.noteOn(\testnoteon, {|...args|
- (["note on"] ++ args).postln;
+(["note on"] ++ args).postln;
});
MIDIdef.noteOff(\testnoteoff, {|...args|
- (["note off"] ++ args).postln;
+(["note off"] ++ args).postln;
});
MIDIdef.touch(\testtouch, {|...args|
- (["touch"] ++ args).postln;
+(["touch"] ++ args).postln;
});
MIDIdef.polytouch(\testpolytouch, {|...args|
- (["polytouch"] ++ args).postln;
+(["polytouch"] ++ args).postln;
});
MIDIdef.bend(\testbend, {|...args|
- (["bend"] ++ args).postln;
+(["bend"] ++ args).postln;
});
MIDIdef.sysex(\testsysex, {|...args|
- (["sysex"] ++ args).postln;
+(["sysex"] ++ args).postln;
});
)
*/
(
~push.hcPushTurnS = { |zi, delta|
- ~col = (~col + delta).clip(0, 127);
- ~col.postln;
- (0..127).do({|i|
- ~push.pushOut.noteOn(0, i, ~col);
- ~push.pushOut.control(0, i, ~col);
- });
+~col = (~col + delta).clip(0, 127);
+~col.postln;
+(0..127).do({|i|
+~push.pushOut.noteOn(0, i, ~col);
+~push.pushOut.control(0, i, ~col);
+});
};
)
*/
(
~color = 1;
8.do({|i|
- 8.do({|j|
- ~push.pushOut.noteOn(0, 36+(i*8)+j, ~color);
- ~color = ~color + 1;
- });
+8.do({|j|
+~push.pushOut.noteOn(0, 36+(i*8)+j, ~color);
+~color = ~color + 1;
+});
});
)
*/
-
-MPush.lights.topRowColor.keys;
-MPush.lights.padColor.keys;
\ No newline at end of file