// title: Midterm Q3 // author: unknown // description: // code: ( 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; )