{
   "is_private" : null,
   "id" : "1-51e",
   "code" : "// Wine Glass Sound\r\n(\r\nSynthDef(\"AM\", { arg freq = 523.25, modfreq = 1, amp = 0.5, attack = 2, dur = 5, pos = 0;\r\n\tvar carrier, modulator, env;\r\n\tmodulator = SinOsc.kr(modfreq).range(0, 1);\r\n\tcarrier = SinOsc.ar(freq: freq, mul: modulator);\r\n\tenv = Env.perc(attackTime: attack, releaseTime: dur - attack, level: amp).kr(2);\r\n\tcarrier = carrier * env;\r\n\tOut.ar(0, Pan2.ar(carrier, pos))\r\n}).add;\r\n)\r\n\r\n(\r\nPbind(\r\n\\instrument, \"AM\",\r\n\t\\note, 15,\r\n\t\\dur, 10,\r\n\t\\amp, Pwhite(0.5, 0.1),\r\n\t\\att, 1,\r\n\t\\rel, 10\r\n).play;\r\n)\r\n\r\n\r\n\r\n\r\n// changes to the modfreq in SynthDef \"AM1\" -- rougher rubbing against the glass\r\n(\r\nPbind(\r\n\\instrument, \"AM\",\r\n\t\\note, 15,\r\n\t\\dur, 10,\r\n\t\\amp, Pwhite(0.5, 0.1),\r\n\t\\att, 1,\r\n\t\\rel, 10,\r\n\t\\modfreq, 10\r\n).play;\r\n)\r\n\r\n\r\n\r\n\r\n// even higher modfreq -- greater number of voices\r\n(\r\nPbind(\r\n\\instrument, \"AM\",\r\n\t\\note, 15,\r\n\t\\dur, 10,\r\n\t\\amp, Pwhite(0.5, 0.1),\r\n\t\\att, 1,\r\n\t\\rel, 10,\r\n\t\\modfreq, 1000\r\n).play;\r\n)",
   "labels" : [
      "wineglass"
   ],
   "ancestor_list" : [],
   "description" : "This is an addition to my first code of wine glass sound: \"The friction between a finger dipped in water and the edge of a wine glass creating a sound.\" I have added a couple more synthdefs/codes to demonstrate the differences when modfreq is changed. A higher modfreq changes the purity of the tone.",
   "name" : "Wine Glass Code - Edited",
   "author" : "schun"
}
