From f521a956e21965227a707b78985888528419d15f Mon Sep 17 00:00:00 2001 From: Eugene Petkevich Date: Sat, 6 Jan 2024 19:25:56 +0100 Subject: [PATCH] rename fader and mixer into masterer / add limiter to masterer --- startup.scd | 20 ++++++++++++---- temp.scd | 2 +- ...0\277\320\265\321\201\320\275\321\217.scd" | 24 ++++++++++--------- 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/startup.scd b/startup.scd index ef2d2aa..bcdaf5b 100644 --- a/startup.scd +++ b/startup.scd @@ -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 diff --git a/temp.scd b/temp.scd index 5df2882..4acce5c 100644 --- 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 diff --git "a/\320\232\320\260/\320\232\320\260\320\274\321\213\321\200-\320\245\321\213\320\277\321\221\320\264\321\221/\320\245\321\213\320\277\321\221\320\264\321\221-\320\277\320\265\321\201\320\275\321\217.scd" "b/\320\232\320\260/\320\232\320\260\320\274\321\213\321\200-\320\245\321\213\320\277\321\221\320\264\321\221/\320\245\321\213\320\277\321\221\320\264\321\221-\320\277\320\265\321\201\320\275\321\217.scd" index 2d64a94..a9bd7f3 100644 --- "a/\320\232\320\260/\320\232\320\260\320\274\321\213\321\200-\320\245\321\213\320\277\321\221\320\264\321\221/\320\245\321\213\320\277\321\221\320\264\321\221-\320\277\320\265\321\201\320\275\321\217.scd" +++ "b/\320\232\320\260/\320\232\320\260\320\274\321\213\321\200-\320\245\321\213\320\277\321\221\320\264\321\221/\320\245\321\213\320\277\321\221\320\264\321\221-\320\277\320\265\321\201\320\275\321\217.scd" @@ -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 @@ -23,14 +23,15 @@ ~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(); @@ -54,11 +55,14 @@ ).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 -- 2.17.1