test Pdefn
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Tue, 9 Jan 2024 01:14:38 +0000 (02:14 +0100)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Tue, 9 Jan 2024 01:14:38 +0000 (02:14 +0100)
temp.scd

index 8a074eb..daf730f 100644 (file)
--- a/temp.scd
+++ b/temp.scd
@@ -80,4 +80,44 @@ SynthDef(\testmouse, {|kout|
 )
 
 ~cont = ~makeControlMouseX.(200, 17000, 1);
-~conty = ~makeControlMouseY.(0.001, 0.8, 0);
\ No newline at end of file
+~conty = ~makeControlMouseY.(0.001, 0.8, 0);
+
+// test pdefn
+
+(
+Pdef(\beat, Pmono(\qoba, *[
+  trig: 1,
+  accent: 0.5,
+  freq: 40,
+  tone: 0.5,
+  decay: 0.9,
+  attackfm: 0.3,
+  selffm: 0.75,
+  dur: 4,
+  db: 15,
+  out: a.h,
+])).quant_(4).play;
+
+TempoClock.tempo = 2;
+Pdefn(\durtest, Pseq([1, Pseq([Rest(1)], inf)], inf)).quant_(4);
+Pdef(\temp, Pbind(*[
+  instrument: \dyti,
+  db: -19,
+  octave: 4,
+  degree: Pshuf([1, 5, 10, 16], inf),
+  dur: Pdefn(\durtest),
+  release: TempoClock.tempo.reciprocal*1.0,
+  legato: 0.5,
+  cut: 3200,
+  rez: 0.7,
+  modFreqMin: 4,
+  modFreqMax: 4.5,
+  modAmp: Pwhite(0.001, 0.002),
+  pan: [-0.7, 0.7],
+  out: a.h,
+])).quant_(4).play;
+)
+
+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 });
\ No newline at end of file