Add test file
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Fri, 6 May 2022 14:30:29 +0000 (17:30 +0300)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Fri, 6 May 2022 14:30:29 +0000 (17:30 +0300)
test.scd [new file with mode: 0644]

diff --git a/test.scd b/test.scd
new file mode 100644 (file)
index 0000000..5eb4add
--- /dev/null
+++ b/test.scd
@@ -0,0 +1,62 @@
+~se = ~samplerFactory.value;
+
+~se.startRec();
+~se.stopRec();
+
+~se.buf.plot;
+~se.buf.getToFloatArray(wait:0.01, action: {arg array; a = array; { a[0..100].plot }.defer; "done".postln });
+
+~se.playSample();
+~se.duration = 2.5;
+
+(
+SynthDef(\test, { |amp = 1.0|
+  Out.ar(0, SoundIn.ar(1!2, amp.lag(0.01)));
+}).add;
+)
+
+a = Synth(\test);
+a.free;
+
+(
+MIDIdef.cc(\pollcc, { |...args|
+  //"cc".postln;
+  //args.postln;
+});
+
+MIDIdef.noteOn(\pollnoteon, { |...args|
+  "noteon".postln;
+  args.postln;
+});
+)
+
+(
+MIDIdef.cc(\tafe, { |...args|
+  var amp = args[0].linlin(0, 127, 0.1, 20);
+  a.set(\amp, amp);
+  amp.postln;
+}, 1);
+)
+
+/// push test
+
+~push = ~pushFactory.value;
+
+(
+~color = 0;
+8.do({|i|
+  4.do({|j|
+    ~push.hcPushPadLed(j+4, i, 3, ~color, true, 0);
+    ~color = ~color + 1;
+  });
+});
+)
+
+~push.hcPushKeyPressure.valueArray([1, 2, 3, 4]);
+~push.hcPushKeyOn.valueArray([1, 2, 3, 4]);
+
+(
+~push.hcPushKeyOn = {|...args|
+  args[1].postln;
+};
+)
\ No newline at end of file