var push = Environment[
\version -> "33.7.2.5",
+ \tempo -> 2,
+
\padColor -> IdentityDictionary[
\white -> 0,
\red -> 1,
zi.pushOut.free;
};
+ // todo — always send clocks, and separate start/stop from setting tempod
+ push.setTempo = { |zi, tempo|
+ {
+ zi.pushOut.start;
+ 1.do({
+ 24.do({
+ zi.pushOut.midiClock;
+ (1.0/zi.tempo/24).wait;
+ });
+ });
+ zi.pushOut.stop;
+ }.fork();
+ };
+
+ // Starter message and animation
+
+ {
+ (0..127).do({|i|
+ ~push.pushOut.noteOn(0, i, 1);
+ ~push.pushOut.control(0, i, 1);
+ });
+ 1.wait;
+ (0..127).do({|i|
+ ~push.pushOut.noteOn(0, i, 0);
+ ~push.pushOut.control(0, i, 0);
+ });
+ }.fork();
+
+ "Џяпюӈи готов к использованию 😊".postln;
+
push;
};
)
~col = (~col + delta).clip(0, 127);
~col.postln;
(0..127).do({|i|
- ~push.pushOut.noteOn(0, i, ~col);
+ ~push.pushOut.noteOn(13, i, ~col);
~push.pushOut.control(0, i, ~col);
});
};
)
+(
+{
+ ~tempo = 40;
+ ~push.pushOut.start;
+ 5.do({
+ 24.do({
+ ~push.pushOut.midiClock;
+ (60/~tempo/24).wait;
+ });
+ });
+ ~push.pushOut.stop;
+}.fork();
+)
+
~push.pushOut
m = MIDIClockOut("Ableton Push", "Ableton Push MIDI 2");
};
)
-~test = ~factory.value;
\ No newline at end of file
+~test = ~factory.value;
+
+~push.setTempo(1);
\ No newline at end of file