make infinite song
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Sat, 1 Apr 2023 17:22:26 +0000 (19:22 +0200)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Sat, 1 Apr 2023 17:22:26 +0000 (19:22 +0200)
Зясах-Мыҏиӈё.scd

index 326138b..5d735cd 100644 (file)
@@ -89,7 +89,7 @@
 
 (
 ~reverbSynths.do{|item|
-  item.set(\mix, 0.2.rand);
+  item.set(\mix, 0.4.rand);
 };
 )
 
@@ -464,14 +464,35 @@ Pdef.all.do{|i| i.stop};
 )
 
 (
-TempoClock.tempo = 1/8;
-thisThread.randSeed = 2001;
-Pdef(2, ~makeBeatPat.(0.1, 2, -3-100)).quant_(4).play;
-Pdef(3, ~makeBeatPat.(0.2, 3, -5-100)).quant_(4).play;
-Pdef(4, ~makeBeatPat.(0.35, 4, -12-100)).quant_(4).play;
-Pdef(5, ~makeBeatPat.(0.5, 5, -18-100)).quant_(4).play;
-Pdef(6, ~makeBeatPat.(0.75, 6, -30-100)).quant_(4).play;
-Pdef(7, ~makeBeatPat.(0.9, 7, -39-100)).quant_(4).play;
+thisThread.randSeed = 10300;
+Pdef(2, ~makeBeatPat.(0.1, 2, -3)).quant_(4).play;
+Pdef(3, ~makeBeatPat.(0.2, 3, -5)).quant_(4).play;
+Pdef(4, ~makeBeatPat.(0.35, 4, -12)).quant_(4).play;
+Pdef(5, ~makeBeatPat.(0.5, 5, -18)).quant_(4).play;
+Pdef(6, ~makeBeatPat.(0.75, 6, -30)).quant_(4).play;
+Pdef(7, ~makeBeatPat.(0.9, 7, -39)).quant_(4).play;
+)
+
+(
+~task.stop;
+TempoClock.tempo = 1/4;
+~bar = 0;
+~task = Task({{
+  thisThread.randSeed = 10300 + ~bar;
+  ~bar = ~bar + 1;
+  ~bar.postln;
+  thisThread.clock.beats.postln;
+  ~song = Ppar([
+    ~makeBeatPat.(0.1, 2, -3),
+    ~makeBeatPat.(0.2, 3, -5),
+    ~makeBeatPat.(0.35, 4, -12),
+    ~makeBeatPat.(0.5, 5, -18),
+    ~makeBeatPat.(0.75, 6, -30),
+    ~makeBeatPat.(0.9, 7, -39),
+  ], 1);
+  Pdef(\song, ~song).quant_(4).play;
+  4.wait;
+}.loop}, TempoClock.default).start;
 )
 
 //// testing synth and scale on keyboard
@@ -501,7 +522,7 @@ Pdef(7, ~makeBeatPat.(0.9, 7, -39-100)).quant_(4).play;
   ];
 };
 )
-
+s.meter
 (
 ~keys = KeySynth(~kedifu, ~synthChooser, 12/13, true, {|f,v|~keyParams.(f,v)}, 0.3,
   onlyWhite: true, scale: ~scale);