-
Notifications
You must be signed in to change notification settings - Fork 10
/
cymbalic_mcld.scd
35 lines (26 loc) · 1.04 KB
/
cymbalic_mcld.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
/*
Based on the example at
http://www.mcld.co.uk/cymbalsynthesis/
published 2008 by Dan Stowell
Synth(\cymbalic_mcld)
*/
(SynthDef(\cymbalic_mcld, { |out=0, pan=0, amp=0.1|
var lodriver, locutoffenv, hidriver, hicutoffenv, freqs, res, thwack;
locutoffenv = EnvGen.ar(Env.perc(0.5, 5)) * 20000 + 10;
lodriver = LPF.ar(WhiteNoise.ar(0.1), locutoffenv);
hicutoffenv = 10001 - (EnvGen.ar(Env.perc(1, 3)) * 10000);
hidriver = HPF.ar(WhiteNoise.ar(0.1), hicutoffenv);
hidriver = hidriver * EnvGen.ar(Env.perc(1, 2, 0.25));
thwack = EnvGen.ar(Env.perc(0.001,0.001,1));
// This bit will regenerate new freqs every time you evaluate the SynthDef!
freqs = {exprand(300, 20000)}.dup(100);
res = Ringz.ar(lodriver + hidriver + thwack, freqs).mean;
Out.ar(out, Pan2.ar(((res * 1) + (lodriver * 2) + thwack) * amp, pan));
},
metadata: (
credit: "Based on the example at http://www.mcld.co.uk/cymbalsynthesis/ published 2008 by Dan Stowell",
tags: [\percussion, \cymbal, \gong, \inharmonic, \additive, \subtractive]
)
).add;
)
Synth(\cymbalic_mcld);