«Re: Timpani» by yvan

on 10 Oct'13 13:11 in code forksynthesissubtractive synthesisroutineorquestraltimpani
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
s.boot

(
SynthDef(\aSynth, { |rel = 0, choose = 0, amp = 0|
    var klank, env;

    klank = Klank.ar(`[choose ! 12, {Rand(0.128, 0.7)} ! 12], BrownNoise.ar(0.7));
    env   = EnvGen.kr(Env.perc(0.01, rel), doneAction: 2);
    Out.ar(0, klank * env.dup * amp);
}).add;
)

(
{
    42.do{
        x = [70, 90, 120].choose;
        y = rrand(0.01, 5);
        // attack
        Synth(\aSynth, [\rel, y, \choose, x, \amp, 128e-6]);
        // resonance
        Synth(\aSynth, [\rel, 1, \choose, x, \amp, 128e-5]);
        y.wait;
    }
}.fork;
)
raw 566 chars (focus & ctrl+a+c to copy)
reception
comments