parent
61e43e8841
commit
138afb3cb8
1 changed files with 131 additions and 0 deletions
@ -0,0 +1,131 @@ |
||||
( ////////////////////////////////////////////////////// |
||||
s.latency = 0.04; |
||||
Server.default.waitForBoot { |
||||
|
||||
|
||||
~dlyBus1.free; |
||||
~dlyBus1 = Bus.audio(s,2); |
||||
|
||||
~dlyBus2.free; |
||||
~dlyBus2 = Bus.audio(s,2); |
||||
|
||||
~revBus.free; |
||||
~revBus = Bus.audio(s,2); |
||||
|
||||
fork { |
||||
SynthDef(\baz1, { |
||||
|
||||
arg outBus=0, gate=1, freq, amp, fff=5, res=1, delwet=0.3, wrap=1.2; |
||||
var snd, env, fenv; |
||||
|
||||
fenv = EnvGen.ar(Env.adsr(), gate) + 1; |
||||
env = EnvGen.ar(Env.cutoff, gate, doneAction:Done.freeSelf); |
||||
snd = Pulse.ar([freq, freq*1.005], mul:1); |
||||
snd = snd + LFTri.ar([freq * 0.995, freq] * 1, mul:4); |
||||
snd = snd.clip2; |
||||
snd = snd.wrap2(wrap); |
||||
snd = MoogFF.ar(snd, freq * fenv * fff, res); |
||||
snd = Limiter.ar(snd); |
||||
snd = snd * amp * env; |
||||
|
||||
Out.ar(outBus, snd); |
||||
}).add; |
||||
|
||||
|
||||
SynthDef(\delay, { |
||||
arg inBus, outBus, delwet=0.5, amp=1; |
||||
var in, snd, del; |
||||
|
||||
in = In.ar(inBus, 2); |
||||
del = CombN.ar(in, 1, [0.7,0.5], 4, mul:delwet); |
||||
snd = BPF.ar(del + in, 500); |
||||
snd = snd * amp; |
||||
|
||||
Out.ar(outBus, snd); |
||||
}).add; |
||||
|
||||
|
||||
SynthDef(\reverb, { |
||||
arg inBus, outBus, revwet=0.5, amp=0.1; |
||||
var in, snd, del, rev; |
||||
|
||||
in = In.ar(inBus,2); |
||||
del = DelayN.ar(in, 0.048); |
||||
rev = Mix.ar(Array.fill(7,{ CombL.ar(del, 0.1, LFNoise1.kr(0.1.rand, 0.04, 0.05), 15) })); |
||||
4.do({ rev = AllpassN.ar(rev, 0.050, [0.050.rand, 0.050.rand], 1) }); |
||||
snd = rev * 0.04 * amp; |
||||
|
||||
Out.ar(outBus, snd); |
||||
}).add; |
||||
|
||||
s.sync; |
||||
|
||||
// ----------------------------------------------------------------------------// |
||||
// effects |
||||
|
||||
~reverb1 = Synth(\reverb, [\inBus, ~dlyBus1, \outBus, 0]); |
||||
~reverb2 = Synth(\reverb, [\inBus, ~dlyBus2, \outBus, 0]); |
||||
|
||||
0.2.wait; |
||||
|
||||
~delay1 = Synth(\delay, [\inBus, ~dlyBus1, \outBus, 0, \delwet, 0.1]); |
||||
~delay2 = Synth(\delay, [\inBus, ~dlyBus2, \outBus, 0, \delwet, 0.2 ]); |
||||
|
||||
0.2.wait; |
||||
|
||||
// ----------------------------------------------------------------------------// |
||||
// patterns |
||||
|
||||
Pbindef(\line1, |
||||
\instrument, \baz1, |
||||
\dur, 1/8, |
||||
\degree, Pseq([0,2,5,7,Pwrand([12,13,14],[0.9,0.05,0.05]),2,5], inf), |
||||
\mtranspose, Pstutter(160,Pseq([0,3,5],inf)), |
||||
\legato, Pseg([1,5,1]/10, 15, \cubed, inf), |
||||
\octave, [3,5], |
||||
\scale, Scale.major(\just), |
||||
\amp, Pseg([0.1,0.2,0.1], 23, \lin, inf), |
||||
\fff, Pseg([1,1.5,1], 30, \cubed, inf), |
||||
\res, Pseg([1,2,1], 8, \cubed, inf), |
||||
\delwet, 1, |
||||
\outBus, ~dlyBus2 |
||||
).play; |
||||
|
||||
59.wait; |
||||
|
||||
Pbindef(\line1, \amp, 0) ; |
||||
1.wait; |
||||
|
||||
Pbindef(\line1, \amp, Pseg([0.1,0.2,0.1], 23, \lin, inf)); |
||||
|
||||
Pbindef(\bazpat, |
||||
\instrument, \baz1, |
||||
\dur, Pseq([1,1,2,4] / 8, inf), |
||||
\degree, Pseq([0, 3, 2, 0, 7, 6], inf), |
||||
\mtranspose, Pseq([ Pn(0, 4*20), Pn(3, 4*20) ],inf), |
||||
\octave, [2,3], |
||||
\scale, Scale.major(\just), |
||||
\legato, Prand((1..10)/10, inf), |
||||
\amp, Pseg([ [0, 0.6], [0.3,0.6], [0,0.6] ], 17, \lin, inf), |
||||
\fff, Pseg([1,13,1], 15, \cubed, inf), |
||||
\res, Pseq([1,2,3]/2,inf), |
||||
\wrap, Pseg([2, 0.9, 2], 19, \exp, inf), |
||||
\outBus, ~dlyBus1 |
||||
).play; |
||||
|
||||
120.wait; |
||||
|
||||
Pbindef(\line1, \mtranspose, 0); |
||||
Pbindef(\bazpat).stop; |
||||
|
||||
10.wait; |
||||
|
||||
Pbindef(\line1).stop; |
||||
b |
||||
} |
||||
} |
||||
) |
||||
// ----------------------------------------------------------------------------------- // |
||||
// ----------------------------------------------------------------------------------- // |
||||
// ----------------------------------------------------------------------------------- // |
||||
// ----------------------------------------------------------------------------------- // |
Loading…
Reference in new issue