rename fader and mixer into masterer / add limiter to masterer
authorEugene Petkevich <nasedil.genio.code@gmail.com>
Sat, 6 Jan 2024 18:25:56 +0000 (19:25 +0100)
committerEugene Petkevich <nasedil.genio.code@gmail.com>
Sat, 6 Jan 2024 18:25:56 +0000 (19:25 +0100)
startup.scd
temp.scd
Ка/Камыр-Хыпёдё/Хыпёдё-песня.scd

index ef2d2aa..bcdaf5b 100644 (file)
@@ -67,12 +67,22 @@ c = (
 
 ~recSpeakers = {s.record(bus: a.h)};
 
-// Fader
-
-SynthDef(\fader, {|in, out, amp=1.0|
+/* masterer
+~masterer = Synth(\masterer, (
+  in: ~mainBus,
+  out: a.h,
+  amp: 1.0,
+  lookAheadTime: 0.05,
+).asPairs, ~masterGroup);
+*/
+SynthDef(\masterer, {arg in, out,
+  amp=1.0,
+  lookAheadTime=0.05
+  ;
   var sig;
-  sig = In.ar(in, 2);
-  Out.ar(out, sig*amp);
+  sig = In.ar(in, 2) * amp;
+  sig = Limiter.ar(sig, level: 1.0, dur: lookAheadTime);
+  Out.ar(out, sig);
 }).add;
 
 // Other stuff
index 5df2882..4acce5c 100644 (file)
--- a/temp.scd
+++ b/temp.scd
@@ -14,4 +14,4 @@ x.free;
 
 a = Pgeom(1, Pwhite(1, 5), 5);
 r = Routine { 2.yield; 3.yield; a.embedInStream; 7.yield; };
-r.nextN(12); // the next 12 values from r
\ No newline at end of file
+r.nextN(12); // the next 12 values from r
index 2d64a94..a9bd7f3 100644 (file)
@@ -1,6 +1,6 @@
 // Хыпёдё
 
-// 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
+// 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; individual groups for each pattern in case of stuck synths to kill them or fade out; output all generated splits and patterns to catch nice sounding ones and save for the future
 
 // values
 
 ~createGroupsBusses = {
   ~instrumentGroup = Group(s);
   ~effectGroup = Group.after(~instrumentGroup);
-  ~mixerGroup = Group.after(~effectGroup);
+  ~masterGroup = Group.after(~effectGroup);
 
   ~mainBus = Bus.audio(s, 2);
-  ~mainMixer = Synth(\fader, (
+  ~masterer = Synth(\masterer, (
     in: ~mainBus,
     out: a.h,
     amp: 1.0,
-  ).asPairs, ~mixerGroup);
+    lookAheadTime: 0.05,
+  ).asPairs, ~masterGroup);
 
   ~jpverbs = Array();
   ~reverbBuses = Array();
     ).asPairs, ~effectGroup));
   };
 };
+ServerTree.removeAll;
+ServerTree.add(~createGroupsBusses);
+
 ~drawWindows = {
   s.plotTree
 };
-ServerTree.add(~createGroupsBusses);
-ServerTree.add(~drawWindows);
+ServerBoot.removeAll;
+ServerBoot.add(~drawWindows);
 )
 
 (
@@ -159,10 +163,10 @@ Pdef(\melodythree, Pbind(*[
 (
 Pdef(\pad, Pbind(*[
   instrument: \neta,
-  db: -22,
+  db: -6,
   octave: Prand([2, 3, 4, 5], inf),
   degree: Pshuf([6, 2, 4, 6, 4, 3], inf),
-  dur: Pseq([3, 3, 2].split(2), 1),
+  dur: Pseq([3, 3, 2].split(2), inf),
   legato: Pwhite(0.2, 0.8),
   pan: Pwhite(-0.2, 0.2) * [-1, 1],
   out: ~reverbBuses[1],
@@ -320,9 +324,7 @@ Pdef(\marimba3).stop;
 Pdef(\marimba4).stop;
 )
 
-// mixer TODO: create another file for mixer
-
-~mainMixer.set(\amp, -45.dbamp);
+~masterer.set(\amp, -45.dbamp);
 
 // recording