post arrays after generating
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Sat, 13 Jan 2024 12:48:18 +0000 (13:48 +0100)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Sat, 13 Jan 2024 12:48:18 +0000 (13:48 +0100)
library/template.scd
temp.scd

index 8de4563..ac666d8 100644 (file)
@@ -27,6 +27,10 @@ ServerBoot.removeAll;
 //ServerBoot.add(~drawWindows);
 )
 
+// server boot
+
+s.reboot;
+
 // recording
 
 (
@@ -78,6 +82,13 @@ TempoClock.tempo = 1.5;
 
 // pdefs
 
+(
+~walomaju = 4.split(5);
+"~walomaju = %\n".postf(~walomaju);
+)
+
+Pdefn(\fagiDur, Pseq(~walomaju, inf)).quant_(4);
+
 (
 Pdef(\fagi, Pbind(*[
   group: ~fagiGroup,
@@ -86,7 +97,7 @@ Pdef(\fagi, Pbind(*[
   db: 40,
   pan: 0,
   trig: 1,
-  dur: 1,
+  dur: Pdefn(\fagiDur),
   legato: 0.7,
   release: TempoClock.tempo.reciprocal / 2,
   octave: 5,
index 4c1abb5..b5af972 100644 (file)
--- a/temp.scd
+++ b/temp.scd
@@ -126,6 +126,19 @@ z = Pbind(\degree, Pdefn(\x, \), \dur, 0.25).play;
 Pdefn(\x, Pseq((0..5), inf)).condition_({ |val, i| i.postln % 6 == 0 });
 Pdefn(\x, Pseq((7..0), inf)).condition_({ |val, i| i.postln % 8 == 0 });
 
+// pbindf
+
+(
+a = Pbind(\x, Pseq([1, 2, 3]), \zzz, 9000); // input stream
+b = Pbindf(a, \y, Prand([100, 300, 200], inf), \zzz, 99);
+x = b.asStream;
+)
+
+x.next(()); // pass in an event ()
+x.next(());
+x.next(());
+x.next(()); // end: nil
+
 /// different start / mid / end pitch
 
 // synthdefs