«Midterm Q3» by unknown
on 31 Oct'16 07:55 in1 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
(
SynthDef("bell", {arg freq, amp;
var env, snd, partials, relativeAmps;
partials = [0.5, 1, 1.19, 1.56, 2, 2.51, 2.66, 3.01, 4.1];
relativeAmps = [0.25, 1, 0.8, 0.5, 0.9, 0.4, 0.3, 0.6, 0.1];
env = Env.perc(
attackTime: 0.01,
releaseTime: 5,
level: amp*relativeAmps).kr(doneAction:2);
snd = SinOsc.ar(
freq: freq*partials,
mul: env
);
snd = Mix.ar(snd);
Out.ar(0, snd * 0.1 ! 2);
}).add;
)
//Test your "bell" SynthDef with the following Pbind:
(
Pbind(
\instrument, "bell",
\degree, Pwhite(-5, 10),
\dur, Pwhite(3, 6),
\amp, Pwhite(0.1, 0.5)
).play;
)
reception
correct
1pt