1
0
Fork 0

wrangle me melodie

main
Luka Prinčič 2020-11-18 19:56:11 +01:00
parent e115a8d138
commit 58d5e07c4f
1 changed files with 69 additions and 0 deletions

View File

@ -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
)