добавить детюн и хорус; добавить дисторт
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Tue, 14 Mar 2023 21:23:03 +0000 (22:23 +0100)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Tue, 14 Mar 2023 21:23:03 +0000 (22:23 +0100)
Зясах-Мыҏиӈё.scd

index 0c87aab..dab9c0b 100644 (file)
       pan = 0,
       out = 0
       |
-      var sig = SinOsc.ar(freq, 2pi.rand);
+      var sig;
       var num = 13;
-      var partial;
-      sig = sig * EnvGen.kr(Env.perc(attack, release), doneAction: 2);
+      var partial, detune, detuneMax=0.15, distort, ampEnv;
+      detune = Rand(detuneMax.neg, detuneMax).midiratio;
+      freq = freq * detune;
+      sig = SinOsc.ar(freq, 2pi.rand);
+      ampEnv = EnvGen.kr(Env.perc(attack, release), doneAction: 2);
+      sig = sig * ampEnv;
       num.do({
         var pfact = rrand(2, 41);
         partial = SinOsc.ar(freq * pfact, 2pi.rand);
@@ -26,6 +30,8 @@
         );
         sig = sig + partial;
       });
+      distort = 1 + (1.1 * ampEnv);
+      sig = (sig * distort).clip(-1, 1);
       sig = Pan2.ar(sig, pan, amp);
       Out.ar(out, sig);
     }).add;
@@ -123,7 +129,7 @@ Pdef(\liwarypo, Pbind(*[
 
 (
 ~reverbSynths.do{|item|
-  item.set(\mix, 0.1.rand);
+  item.set(\mix, 0.2.rand);
 };
 )
 
@@ -131,63 +137,91 @@ Pdef(\liwarypo, Pbind(*[
 TempoClock.tempo = 1;
 
 ~emergingNotes = {|n, c| Pseq(n.collect{|i| Pn(Pshuf((0..i), c), c)}, 1)};
+~emergingNotes.(5, 1).asStream.all.size/60/2
 ~emergingNotes.(11, 2).asStream.all.size/60/2
 ~emergingNotes.(13, 3).asStream.all.size/60/3
 ~emergingNotes.(15, 4).asStream.all.size/60/4
 ~emergingNotes.(11, 5).asStream.all.size/60/5
 
 (
-Pdef(\nohagygu, Pbind(*[
+~tenydedi = Pbind(*[
+  out: Pshuf(~reverbBusses.wrapExtend(15), inf),
+  instrument: Pshuf(~synthNames.wrapExtend(15), inf),
+  db: -3,
+  pan: Pwhite(-0.2, 0.2!4),
+  dur: 1,
+  attack: Pwhite(0.01, 0.02),
+  release: Pwhite(0.8, 1.0),
+  scale: Pn(~scale),
+  octave: 1,
+  degree: ~emergingNotes.(5, 1),
+]);
+Pdef(\tenydedi, ~tenydedi).quant_(1).stop;
+
+~nohagygu = Pbind(*[
   out: Pshuf(~reverbBusses.wrapExtend(15), inf),
   instrument: Pshuf(~synthNames.wrapExtend(15), inf),
   db: -9,
-  pan: Pwhite(-0.2, 0.2),
+  pan: Pwhite(-0.2, 0.2!4),
   dur: 1/2,
   attack: Pwhite(0.01, 0.02),
   release: Pwhite(0.8, 1.0),
   scale: Pn(~scale),
   octave: 2,
   degree: ~emergingNotes.(10, 2),
-])).quant_(1).play;
+]);
+Pdef(\nohagygu, ~nohagygu).quant_(1).stop;
 
-Pdef(\hahuqefy, Pbind(*[
+~hahuqefy = Pbind(*[
   out: Pshuf(~reverbBusses.wrapExtend(15), inf),
   instrument: Pshuf(~synthNames.wrapExtend(15), inf),
   db: -18,
-  pan: Pwhite(-0.4, 0.4),
+  pan: Pwhite(-0.4, 0.4!4),
   dur: 1/3,
   attack: Pwhite(0.01, 0.02),
   release: Pwhite(0.5, 0.9),
   scale: Pn(~scale),
   octave: 3,
   degree: ~emergingNotes.(9, 3),
-])).quant_(1).play;
+]);
+Pdef(\hahuqefy, ~hahuqefy).quant_(1).stop;
 
-Pdef(\tymaroso, Pbind(*[
+~tymaroso = Pbind(*[
   out: Pshuf(~reverbBusses.wrapExtend(15), inf),
   instrument: Pshuf(~synthNames.wrapExtend(15), inf),
   db: -28,
-  pan: Pwhite(-0.6, 0.6),
+  pan: Pwhite(-0.6, 0.6!4),
   dur: 1/4,
   attack: Pwhite(0.01, 0.02),
   release: Pwhite(0.4, 0.7),
   scale: Pn(~scale),
   octave: 5,
   degree: ~emergingNotes.(15, 4),
-])).quant_(1).play;
+]);
+Pdef(\tymaroso, ~tymaroso).quant_(1).stop;
 
-Pdef(\rekyhabe, Pbind(*[
+~rekyhabe = Pbind(*[
   out: Pshuf(~reverbBusses.wrapExtend(15), inf),
   instrument: Pshuf(~synthNames.wrapExtend(15), inf),
   db: -45,
-  pan: Pwhite(-0.7, 0.7),
+  pan: Pwhite(-0.7, 0.7!4),
   dur: 1/5,
   attack: Pwhite(0.01, 0.02),
   release: Pwhite(0.3, 0.5),
   scale: Pn(~scale),
   octave: 7,
   degree: ~emergingNotes.(15, 4),
-])).quant_(1).play;
+]);
+Pdef(\rekyhabe, ~rekyhabe).quant_(1).stop;
+
+~nyhoweni = Ptpar([
+  0, ~tenydedi,
+  20, ~nohagygu,
+  40, ~hahuqefy,
+  60, ~tymaroso,
+  80, ~rekyhabe,
+], 1);
+Pdef(\test, ~nyhoweni).quant_(1).play;
 )
 
 ////