From 58d5e07c4f47a6a4b7ee34b08b0c754d0a016c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Prin=C4=8Di=C4=8D?= Date: Wed, 18 Nov 2020 19:56:11 +0100 Subject: [PATCH] wrangle me melodie --- 2020-11-18-wranglenicemelodies.scd | 69 ++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 2020-11-18-wranglenicemelodies.scd diff --git a/2020-11-18-wranglenicemelodies.scd b/2020-11-18-wranglenicemelodies.scd new file mode 100644 index 0000000..7a446e6 --- /dev/null +++ b/2020-11-18-wranglenicemelodies.scd @@ -0,0 +1,69 @@ + +// set bus for the fx-delay +~delay1 = Bus.audio(s, 2); + +( // synthdefs: + +SynthDef(\sin1, { + arg freq=440, out=0, gate=1, amp=0.1, release=0, cutoff=10, rq=0.5; + var snd, env; + freq = [freq,freq*1.01]; + env = Linen.kr(gate, attackTime: 0.001, releaseTime: release, doneAction:2); + snd = SinOsc.ar(freq) + Saw.ar(freq*1.003, mul:0.3) + Pulse.ar(freq*0.997, mul:0.4); + cutoff = cutoff * 0.1; + cutoff = freq.pow(cutoff); + cutoff = cutoff.max(100); + cutoff = cutoff.min(18000); + snd = RLPF.ar(snd, cutoff, rq); + snd = snd * env; + snd = snd * amp; + //snd = Limiter.ar(snd, 0.9); + Out.ar(out, snd); +}).add; + +SynthDef(\dlywrangler, { + arg out=0, in, wet=0.1; + var snd, dly2; + snd = In.ar(in,2); + dly2 = CombN.ar(HPF.ar(snd,300), 1, [0.5,0.77], 5, mul:LFNoise1.kr(0.1).range(0.4,0.1)); + snd = CombN.ar(snd, 1, Lag.ar(LFNoise0.ar(1).range(0.01,0.1),0.1), 3, mul:wet) + snd; + snd = Limiter.ar(snd, 0.8); + snd = snd + dly2; + Out.ar(out, snd); +}).add; +) + +// created delaymangler comb +~dlywrang1.free +~dlywrang1 = Synth(\dlywrangler, [\out, 0, \in, ~delay1]); + + +( // PLAY +Pbindef(\x1, + \instrument, \sin1, + \degree, Pseq( [ [7,0], 2, -1, 5, Prand([-2,Pseq([2,6])]) ], inf), + + \octave, 5, + \octave, [4,5], + \octave, [4,5,6], + \octave, [4,5,6] + Pwrand([0,2,1,-1],[0.7,0.1,0.1,0.1],inf), + \octave, [4,5,6] + Pwrand([0,2,1,3],[0.7,0.1,0.1,0.1],inf), + + \scale, Scale.major(\just), + \scale, Pwrand([Scale.major(\just), Scale.zhi], [0.9,0.1],inf), + + \mtranspose, 0, + \mtranspose, Pstutter(16,Pseq([Pn(0,6),3,5],inf)), + + \cutoff, Pstutter(16, + Pseq([Pseq((13..18)),Pseq((17..12))].min(17),inf)), + \legato, Pseq([Prand([1,0.7]), 0.6, 0.9, 0.4, 0.6] * 0.9, inf), + \dlywet, Pstutter(8, Pfunc({~dlywrang1.set(\wet, rrand(0, ((0..1) * 0.1).choose ) ) })), + + \dur, 1/8, + \amp, [0.2,0.2,0.1] * Pseq([Prand([1,0.7]), 0.6, 0.9, 0.7, 0.6], inf), + \release, 0.1, + \rq, Prand([0.2,0.3,0.5]*1,inf), + \out, ~delay1, +).play +)