1
0
Fork 0

new file 2021-01-24 acid funk

main
Luka Prinčič 2021-01-24 23:19:35 +01:00
parent 9761e2d46c
commit 17c8cb7615
1 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,86 @@
( fork {
SynthDef(\bz, {
arg gate=1, freq=440, amp=0.1, cutoff=1000, rq=0.1;
var snd, env, cutoffenv;
freq = [freq, freq * 1.02];
// enveloping cutoff frequency of the LP filter!!!!
cutoffenv = EnvGen.ar( Env.adsr(decayTime: 0.1,
sustainLevel: 0.5, releaseTime:0.5),
gate: gate );
cutoff = cutoff * cutoffenv;
cutoff = cutoff.max(50);
// enveloping the amplitude and freeing the synth at end!
env = EnvGen.ar(
envelope: Env.adsr(0.01, 0.1, 0.5, 0.5),
gate: gate,
doneAction:2 );
snd = Pulse.ar(freq);
snd = Saw.ar(freq * 0.98) + (snd * 0.5);
snd = snd * 5;
snd = snd.softclip;
snd = RLPF.ar(snd, cutoff, rq);
snd = Limiter.ar(snd);
snd = snd * env * amp;
Out.ar(0, snd);
}).add;
SynthDef(\hh, {
arg amp=0.1, outBus=0, gate=1, sustain;
var snd, env;
snd = WhiteNoise.ar;
snd = HPF.ar(snd, 2000);
env = EnvGen.ar(Env.perc(0, sustain), doneAction:2);
snd = snd * env * amp;
Out.ar(outBus, snd!2);
}).add;
SynthDef(\snare, {
arg amp = 0.2;
var snd, env;
env = EnvGen.ar(Env([0,1,0], [0.001, 0.2], curve: -4), doneAction:2);
snd = GrayNoise.ar.dup;
snd = snd * env * amp;
Out.ar(0, snd);
}).add;
s.sync;
// patterns
Pbindef(\bzPat,
\instrument, \bz,
\amp, 0.6,
\dur, Pseq([1/2, 1/4, 1/4] , inf)
* Pseq([Pseq([1, 1/2],20),1/2,1,1/2,1/2], inf),
\degree, Pseq([0, 1, 2], inf),
\scale, Scale.minor,
\octave, Pwrand([2, 3, 4], [0.1, 0.8, 0.1], inf),
\legato, Pxrand( (1..9) / 10, inf),
\cutoff, Prand((1..10) * 190 + 150, inf),
\cutoff, Pseq([
Pseg([100,8000,500],[20,10], \exp, 1),
Pseg([500, 4000, 1000, 8000, 800, 2000, 500], 5, \exp, 1),
Pseg([500,8000,100], [10,20], \exp, 1)
]),
\rq, Prand((1..9) * 0.1, inf),
).play;
Pbindef(\hhPat,
\instrument, \hh,
\amp, Prand((2..4) * 0.05, inf),
\dur, Pseq([1/8], 8 * 60 * 1.5),
\legato, Pseq([0.5,0.5,1,0.5],inf),
).play;
Pbindef(\snPat,
\instrument, \snare,
\dur, Pseq([Rest(1/2), 1/2, Rest(7/8), 3/8 ], inf),
\amp, Pseg([0,0.4,0.4,0] + 0.0001, [15, 60, 15], \exp),
).play;
} )