live coding
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Fri, 5 Jan 2024 00:41:00 +0000 (01:41 +0100)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Fri, 5 Jan 2024 00:41:00 +0000 (01:41 +0100)
Ка/Камыр-Хыпёдё/Хыпёдё-песня.scd

index e2361c6..2d64a94 100644 (file)
@@ -1,5 +1,7 @@
 // Хыпёдё
 
+// TODO: limiter on all; synths into file; screencast with delay; fast and nice stop of pattern with finite dur; start with lower volume on mainMixer
+
 // values
 
 (
@@ -8,50 +10,6 @@
 
 // instruments
 
-(
-// amplification coefficients for samples
-~hahomo = (
-  name: "Хахомо",
-  params: [(
-    name: \bu,
-    mul: 0.5,
-  ), (
-    name: \me,
-    mul: 10,
-  ), (
-    name: \mo,
-    mul: 6,
-  ), (
-    name: \nu,
-    mul: 3,
-  ), (
-    name: \da,
-    mul: 3,
-  ), (
-    name: \do,
-    mul: 2,
-  ), (
-    name: \tu,
-    mul: 5,
-  ), (
-    name: \by,
-    mul: 1,
-  ), (
-    name: \bo,
-    mul: 1.5,
-  ), (
-    name: \be,
-    mul: 1.5,
-  ), (
-    name: \ma,
-    mul: 1,
-  ), (
-    name: \my,
-    mul: 1,
-  )];
-);
-)
-
 (
 ~hahomoInstruments = ~makeSampleSynths.(
   ~hahomo.name,
@@ -103,13 +61,17 @@ ServerTree.add(~createGroupsBusses);
 ServerTree.add(~drawWindows);
 )
 
+(
+~synthNames = ~synthGen.value(20);
+)
+
 // test
 
 (
 Pdef(\buben, Pbind(*[
   instrument: Prand([\bu, \bo, \be, \by], inf),
-  db: -6,
-  dur: Pn(Pseq(2.split(3)++2.split(4), 4), inf),
+  db: -8,
+  dur: Pn(Pseq(2.split(3)++2.split(4), 4), 1),
   pan: Pwhite(-0.4, 0.4),
   out: ~reverbBuses[1],
 ])).quant_(4).play;
@@ -118,8 +80,8 @@ Pdef(\buben, Pbind(*[
 (
 Pdef(\plate, Pbind(*[
   instrument: Prand([\me, \mo, \ma, \my], inf),
-  db: -12,
-  dur: Pn(Pseq(2.split(4)++2.split(5), 4), inf),
+  db: -14,
+  dur: Pn(Pseq(2.split(4)++2.split(5), 4), 1),
   pan: Pwhite(-0.7, 0.7),
   out: Prand(~reverbBuses, inf),
 ])).quant_(4).play;
@@ -129,7 +91,7 @@ Pdef(\plate, Pbind(*[
 Pdef(\bass, Pbind(*[
   instrument: Prand([\da, \da], inf),
   db: -18,
-  dur: Pn(Pseq(2.split(2)++2.split(3), 4), inf),
+  dur: Pn(Pseq(2.split(2)++2.split(3), 4), 1),
   pan: Pwhite(-0.5, 0.5),
   out: Prand(~reverbBuses, inf),
 ])).quant_(4).play;
@@ -139,7 +101,7 @@ Pdef(\bass, Pbind(*[
 Pdef(\extra, Pbind(*[
   instrument: Prand([\tu, \nu], inf),
   db: -15,
-  dur: Pn(Pseq(4.split(5), 4), inf),
+  dur: Pn(Pseq(4.split(6), 4), 1),
   pan: Pwhite(-0.5, 0.5),
   out: Prand(~reverbBuses, inf),
 ])).quant_(4).play;
@@ -148,7 +110,7 @@ Pdef(\extra, Pbind(*[
 (
 Pdef(\melody, Pbind(*[
   instrument: \dyti,
-  db: -23,
+  db: -25,
   octave: Prand([4, 5, 6], inf)+[0, 2],
   degree: Pseq([6, 5, 4, 6, 1, 3], inf),
   dur: Pseq([3, 3, 2].split(4), 1),
@@ -167,7 +129,7 @@ Pdef(\melody, Pbind(*[
 (
 Pdef(\melodytwo, Pbind(*[
   instrument: \pope,
-  db: -16,
+  db: -18,
   octave: Prand([5, 6, 7], inf)+[0, 1],
   degree: Pseq([6, 4, 3, 6, 2, 5], inf),
   dur: Pseq([3, 3, 2].split(4), 1),
@@ -198,10 +160,43 @@ Pdef(\melodythree, Pbind(*[
 Pdef(\pad, Pbind(*[
   instrument: \neta,
   db: -22,
-  octave: 2,
-  degree: Pseq([0, 2, 4, 2, 1, 5], inf),
+  octave: Prand([2, 3, 4, 5], inf),
+  degree: Pshuf([6, 2, 4, 6, 4, 3], inf),
+  dur: Pseq([3, 3, 2].split(2), 1),
+  legato: Pwhite(0.2, 0.8),
+  pan: Pwhite(-0.2, 0.2) * [-1, 1],
+  out: ~reverbBuses[1],
+])).quant_(4).play;
+
+Pdef(\pad2, Pbind(*[
+  instrument: \neta,
+  db: -24,
+  octave: Prand([2, 3, 4, 5], inf),
+  degree: Pshuf([6, 2, 4, 6, 4, 3], inf),
   dur: Pseq([3, 3, 2].split(2)/2, 1),
-  legato: 0.8,
+  legato: Pwhite(0.2, 0.8),
+  pan: Pwhite(-0.2, 0.2) * [-1, 1],
+  out: ~reverbBuses[0],
+])).quant_(4).play;
+
+Pdef(\pad3, Pbind(*[
+  instrument: \neta,
+  db: -26,
+  octave: Prand([2, 3, 4, 5], inf),
+  degree: Pshuf([6, 2, 4, 6, 4, 3], inf),
+  dur: Pseq([3, 3, 2].split(2)/4, 1),
+  legato: Pwhite(0.2, 0.8),
+  pan: Pwhite(-0.2, 0.2) * [-1, 1],
+  out: ~reverbBuses[0],
+])).quant_(4).play;
+
+Pdef(\pad4, Pbind(*[
+  instrument: \neta,
+  db: -28,
+  octave: Prand([2, 3, 4, 5], inf),
+  degree: Pshuf([6, 2, 4, 6, 4, 3], inf),
+  dur: Pseq([3, 3, 2].split(2)/8, 1),
+  legato: Pwhite(0.2, 0.8),
   pan: Pwhite(-0.2, 0.2) * [-1, 1],
   out: ~reverbBuses[0],
 ])).quant_(4).play;
@@ -213,10 +208,10 @@ Pdef(\metal, Pbind(*[
   db: -15,
   octave: Prand([8, 9], inf),
   degree: Pxrand([0, 2, 4, 2, 1, 5], inf),
-  dur: Pseq([3, 3, 2].split(3)/2, 1),
-  legato: Pwhite(0.8, 1.2),
+  dur: Pseq([3, 3, 2].split(3)/2, 4),
+  legato: Pgeom(0.8, 1.3),
   pan: Pwhite(-0.7, 0.7) * [-1, 1],
-  out: ~reverbBuses[0],
+  out: ~reverbBuses[2],
 ])).quant_(4).play;
 )
 
@@ -229,7 +224,7 @@ Pdef(\baseight, Pmono(\qoba, *[
   decay: 0.9,
   attackfm: 0.3,
   selffm: 0.75,
-  dur: Pseq(1.split(1)++1.split(2)++2.split(3), 1),
+  dur: Pseq(1.split(1)++1.split(1)++2.split(4), 2),
   db: Pwhite(5, 8)-3,
   out: ~mainBus,
 ])).quant_(4).play;
@@ -254,11 +249,11 @@ Pdef(\marimba0, Pbind(*[
   degree: Pxrand([0, 2, 4, 6, 1, 5], inf),
   attack: TempoClock.tempo.reciprocal*0.01,
   release: TempoClock.tempo.reciprocal*1.0,
-  dur: Pseq(4.split(4), 1),
+  dur: Pseq(4.split(4), inf),
   pan: Pwhite(-0.5, 0.5),
   out: Prand(~reverbBuses, inf),
   db: -8,
-])).quant_(4).play;
+])).quant_(4);
 
 Pdef(\marimba1, Pbind(*[
   instrument: Prand(~synthNames, inf),
@@ -266,11 +261,11 @@ Pdef(\marimba1, Pbind(*[
   degree: Pxrand([0, 2, 4, 2, 6, 5], inf),
   attack: TempoClock.tempo.reciprocal*0.01,
   release: TempoClock.tempo.reciprocal*1.0,
-  dur: Pseq(4.split(5), 1),
+  dur: Pseq(4.split(5), inf)*2,
   pan: Pwhite(-0.5, 0.5),
   out: Prand(~reverbBuses, inf),
   db: -10,
-])).quant_(4).play;
+])).quant_(4);
 
 Pdef(\marimba2, Pbind(*[
   instrument: Prand(~synthNames, inf),
@@ -278,11 +273,11 @@ Pdef(\marimba2, Pbind(*[
   degree: Pxrand([6, 2, 4, 2, 1, 6], inf),
   attack: TempoClock.tempo.reciprocal*0.01,
   release: TempoClock.tempo.reciprocal*1.0,
-  dur: Pseq(4.split(5), 1),
+  dur: Pseq(4.split(5), inf)*4,
   pan: Pwhite(-0.5, 0.5),
   out: Prand(~reverbBuses, inf),
-  db: -13,
-])).quant_(4).play;
+  db: -15,
+])).quant_(4);
 
 Pdef(\marimba3, Pbind(*[
   instrument: Prand(~synthNames, inf),
@@ -290,11 +285,11 @@ Pdef(\marimba3, Pbind(*[
   degree: Pxrand([1, 2, 6, 6, 1, 6], inf),
   attack: TempoClock.tempo.reciprocal*0.01,
   release: TempoClock.tempo.reciprocal*1.0,
-  dur: Pseq(4.split(6), 1),
+  dur: Pseq(4.split(6), inf)*8,
   pan: Pwhite(-0.5, 0.5),
   out: Prand(~reverbBuses, inf),
-  db: -16,
-])).quant_(4).play;
+  db: -19,
+])).quant_(4);
 
 Pdef(\marimba4, Pbind(*[
   instrument: Prand(~synthNames, inf),
@@ -302,11 +297,11 @@ Pdef(\marimba4, Pbind(*[
   degree: Pxrand([6, 2, 4, 6, 5, 6], inf),
   attack: TempoClock.tempo.reciprocal*0.01,
   release: TempoClock.tempo.reciprocal*1.0,
-  dur: Pseq(4.split(6), 1),
+  dur: Pseq(4.split(6), inf)*16,
   pan: Pwhite(-0.5, 0.5),
   out: Prand(~reverbBuses, inf),
-  db: -19,
-])).quant_(4).play;
+  db: -22,
+])).quant_(4);
 )
 
 (
@@ -327,7 +322,7 @@ Pdef(\marimba4).stop;
 
 // mixer TODO: create another file for mixer
 
-~mainMixer.set(\amp, -6.dbamp);
+~mainMixer.set(\amp, -45.dbamp);
 
 // recording