-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathmoogbasstone2.scd
76 lines (46 loc) · 1.52 KB
/
moogbasstone2.scd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//no use of gate, fixed length
SynthDef(\moogbasstone2,{|out= 0 freq = 440 amp = 0.1 gate=1 attackTime= 0.2 fenvamount=0.5 cutoff= 1000 gain=2.0 pan=0.0|
var osc, filter, env, filterenv;
//alternative: richer source
osc = Mix(Pulse.ar(freq.lag(0.05)*[1.0,1.001,2.0],Rand(0.45,0.5)!3,0.33));
filterenv = EnvGen.ar(Env.adsr(attackTime,0.0,1.0,0.2),gate,doneAction:2);
filter = MoogFF.ar(osc,cutoff*(1.0+(fenvamount*filterenv)),gain);
env = EnvGen.ar(Env.adsr(0.001,0.3,0.9,0.2),gate,doneAction:2);
Out.ar(out,Pan2.ar((0.7*filter+(0.3*filter.distort))*env*amp,pan));
}).add;
//via Comb filter for feedback
SynthDef(\delayeffect, {|out =0 gate= 1|
var source = In.ar(out,2);
var delay;
var env = Linen.kr(gate, 0.1, 1, 0.1, 2);
delay= CombC.ar(source,0.25,0.25,2.0);
XOut.ar(out,env, delay);
}).add;
SynthDef(\choruseffect, {|out =0 gate= 1|
var source = In.ar(out,2);
var chorus;
var env = Linen.kr(gate, 0.1, 1, 0.1, 2);
chorus= Mix.fill(7, {
var maxdelaytime= rrand(0.005,0.02);
DelayC.ar(source, maxdelaytime,LFNoise1.kr(Rand(4.5,10.5),0.25*maxdelaytime,0.75*maxdelaytime) )
});
XOut.ar(out,env, chorus);
}).add;
(
Pfx(
Pfx(
Pmono(
\moogbasstone2,
\amp, 0.8,
\midinote,Pseq([24,36,43,48, 43,48,36,36, 36,36,39,36, 31,31,31,31, 31,34,31,34],inf),
\dur,0.25,
\gain,Pn(Pseries(2,0.1,19),inf),
\cutoff,Pstutter(3,Pn(Pseries(50,250,40),inf)),
\attackTime,Pn(Pseries(0.0,0.01,30),inf),
\fenvamount,Pstutter(4,Pn(Pseries(0.0,0.05,20),inf))
),
\delayeffect
),
\choruseffect
).play
)