-
Notifications
You must be signed in to change notification settings - Fork 10
/
kick808.scd
41 lines (33 loc) · 861 Bytes
/
kick808.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
(
SynthDef("kick808", {arg out = 0, freq1 = 240, freq2 = 60, amp = 12, ringTime = 100, rel = 10000, dist = 1.5, pan = 0, tott, durr;
var snd, env;
snd = Ringz.ar(
in: Impulse.ar(0), // single impulse
freq: XLine.ar(freq1, freq2, 0.1),
decaytime: ringTime);
env = EnvGen.ar(Env.perc(0.001, rel, amp), doneAction: 2);
snd = (1.0 - dist) * snd + (dist * (snd.distort));
snd = snd * env;
snd = Limiter.ar(snd, tott, durr) * 0.5 *(1/tott);
//snd = Clip.ar(snd, -1 * tott, tott);
// snd = Fold.ar(snd, -1 * tott, tott);
// snd = Wrap.ar(snd, -1 * tott, tott);
Out.ar(0, Pan2.ar(snd, pan));
}).add;
)
{ SinOsc.ar(200, 0, 0.5) }.plot;
SinOsc
(
Pbind(
\instrument, "kick808",
\dur, 0.004,
\amp, 1,
\rel, 0.9,
\dist, 0.015,
\tott, 0.5,
\durr, 0.01
).play;
)
Pulse.ar
// modulate frequency
{ Pulse.ar(XLine.kr(40,4000,6),0.1, 0.2) }.play;