From ad4e7c3a233238fafbb0ba6dbc175911c5f195b2 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sun, 30 May 2021 11:48:46 -0700 Subject: [PATCH] Sounds nice --- dev.scd | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dev.scd b/dev.scd index c24e85f..ace2408 100644 --- a/dev.scd +++ b/dev.scd @@ -15,7 +15,7 @@ s.waitForBoot { var oscillator, noise, filter, panner, mixer, frequency, qfactor, noise_level, osc_level, lagtime, output, dust; // Dynamic time of the module - lagtime = 1 / (2**octave); + lagtime = 100 / (2**octave); // Oscillator/filter frequency frequency = 130 + (hue * 130) * (2 ** octave); @@ -23,15 +23,18 @@ s.waitForBoot { // Filtered saw oscillator oscillator = SawDPW.ar(frequency); - filter = DFM1.ar(oscillator, frequency*1.2, 0.4, 1.0, 0.0, 0.0006); + filter = DFM1.ar(oscillator, frequency*0.8, 0.8, 1.0, 0.0, 0.0006); // Apply pan panner = LinPan2.ar(filter, pan); // Apply dynamics - output = panner * Lag.kr(HPF.kr(value, 1 / (lagtime), 100), lagtime); + output = panner * Lag.kr(HPF.kr(value, hue / (lagtime)), lagtime*4); //output = panner * BPF.kr(value, 1 / lagtime, 100); + // Compress + output = Compander.ar(output, output, 0.5, 0.3, 0.3, 0.1, lagtime); + // Crank everything down output = output * 0.1; @@ -46,7 +49,7 @@ s.waitForBoot { arg index; var pan, octave; pan = 0 - ((index % 4) - 1.5)/1.5; - octave = (2 - (index / 4).floor) * 2; + octave = (2 - (index / 4).floor); "Module %: Pan %, octave %\n".postf(index, pan.round(1e-1), octave.round(1e-1)); Synth.new(\module, [\hue, 0.5, \saturation, 0.1, \value, 0.5, \pan, pan, \gain, 0.9, \octave, octave]