From 5f146987f6ddf1be32496e92c03ab85ae2c07003 Mon Sep 17 00:00:00 2001 From: Leo Coogan Date: Tue, 8 Apr 2025 07:46:08 -0400 Subject: [PATCH] Cleaning --- padsynth practice EF-edit.scd | 52 +++++------------------------------ 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/padsynth practice EF-edit.scd b/padsynth practice EF-edit.scd index 574248f..d2aedcf 100644 --- a/padsynth practice EF-edit.scd +++ b/padsynth practice EF-edit.scd @@ -6,66 +6,28 @@ MIDIClient.sources.do; ( SynthDef(\rhubarb, { - |freq = 440, gate = 1, cutoff = 1e4, rq = 0.3, amp = 0.05, modDepth = 0.3, modDepth2 = 0.5, noiseLevel = 0.8, ringFreq = 80, detune = 0| - var env, osc1, osc2, osc3, filt1, filt2, filt3, lfo, lfo2, noise, noiseFilt, sig1, sig2, sig3, mix; + |freq = 440, gate = 1, cutoff = 1e4, rq = 0.3, amp = 0.05, modDepth = 0.3, detune = 0| + var env, osc1, osc2, filt1, filt2, lfo, sig, sig1, sig2; - // Slightly Different Oscillators osc1 = LFTri.ar(freq + detune); osc2 = Pulse.ar(freq + detune); - // osc1 = LFTri.ar((freq + detune) * 1); - // osc2 = Pulse.ar((freq + detune)* 0.5); - osc3 = SawDPW.ar(freq * 2); - // LFO to Modulate Filter Frequency lfo = LFNoise2.kr(20).range(1 - modDepth, 1 + modDepth); - lfo2 = LFNoise2.kr(1).range(1 - modDepth, 1 + modDepth); - // lfo2 = noise; - // Apply Different Filters to Each Oscillator filt1 = SVF.ar(osc1, cutoff * lfo, rq); filt2 = RLPF.ar(osc2, cutoff * lfo, rq); - filt3 = RLPF.ar(osc3, cutoff * lfo2, rq); - - // ADSR Envelope env = EnvGen.kr(Env.adsr(0, 0.3, 0.3, 0.1), gate, doneAction: 2); - // Panning and Mixing - sig1 = Pan2.ar(filt1 * env * amp, -0.3); - sig2 = Pan2.ar(filt2 * env * amp, 0.3); - sig3 = Pan2.ar(filt3 * env * amp, 0); - - // sig2 = GVerb.ar(sig2, 299, 4); - // mix = mix + (noise * env * noiseLevel); // Add noise with envelope control + sig1 = Pan2.ar(filt1 * amp * env, -0.3); + sig2 = Pan2.ar(filt2 * amp * env, 0.3); - // mix = DelayC.ar(mix, maxdelaytime: 0.2, delaytime: 0.3); + sig = sig1 + sig2; - // Output - Out.ar(0, sig2!2); + Out.ar(0, sig); }).add; ) -Synth(\rhubarb) - - -( -// Test pattern - -Pbind( - \instrument, \rhubarb, - /*\degree, Pseq([ - [2, 4, 7, 12], [1, 5, 9], [4, 7, 11], [5, 9, 8] - ], inf), // Chord progression*/ - \degree, Pseq([[2, 7, 11], [1, 5, 9], [3, 9], [1,3,5]], inf), - // \degree, Pseq([2, 4, 11,], inf), - // \dur, 0.5, // Duration of each chord - \amp, 0.08, // Volume - // \cutoff, 1200, - \detune, -2, // Slight detune - \pan, Pwhite(-0.3, 0.3), // Random stereo width -).play; -) - @@ -84,7 +46,7 @@ MIDIdef.noteOn(\noteOnTest, { \freq, nn.midicps, \amp, vel.linexp(1,127,0.01,0.3), \gate, 1, - \detune, 2, + \detune, 0, \cutoff, 400, \rq, 0.5, ]