{
   "labels" : [
      "percussive",
      "marimba",
      "modal",
      "xilophone",
      "glokenspiel",
      "tubulars",
      "bells"
   ],
   "code" : "// 1. define the synth\r\n(\r\nSynthDef(\\bell, {\r\n\t|fs=1, t60=1, pitchy=1, amp=0.25, gate=1|\r\n\tvar sig, exciter;\r\n\t//exciter = Impulse.ar(0);\r\n\texciter = WhiteNoise.ar() * EnvGen.ar(Env.perc(0.001, 0.05), gate) * 0.25;\r\n\tsig = Klank.ar(\r\n\t\t`[\r\n\t\t\t[1, 2, 2.803, 3.871, 5.074, 7.81, 10.948, 14.421],   // freqs\r\n\t\t\t[1, 0.044, 0.891, 0.0891, 0.794, 0.1, 0.281, 0.079], // amplitudes\r\n\t\t\t[1, 0.205, 1, 0.196, 0.339, 0.047, 0.058, 0.047]*t60     // ring times\r\n\t\t],\r\n\t\texciter,\r\n\t\tfreqscale:fs*pitchy);\r\n\tsig = FreeVerb.ar(sig) * amp;\r\n\tDetectSilence.ar(sig, 0.001, 0.5, doneAction:2);\r\n\tOut.ar(0, sig!2);\r\n}).add\r\n)\r\n\r\n\r\n// 2. Test a single note\r\nx = Synth(\\bell, [\\fs, 60.midicps, \\t60, 9.177, \\pitchy, 8]);\r\n\r\n\r\n// 3. Test different textures\r\n\r\n// glokenspiel\r\n(\r\nPbind(\r\n\t\\instrument, \\bell,\r\n\t\\fs, Pseq( (60..72), 1).midicps,\r\n\t\\t60, 6,\r\n\t\\pitchy, 4,\r\n\t\\dur, 0.25\r\n).play;\r\n)\r\n\r\n// tubular bells\r\n(\r\nPbind(\r\n\t\\instrument, \\bell,\r\n\t\\fs, Pseq( (60..72), 1).midicps,\r\n\t\\t60, 9,\r\n\t\\pitchy, 1,\r\n\t\\dur, 1\r\n).play;\r\n)\r\n\r\n// xilophone\r\n(\r\nPbind(\r\n\t\\instrument, \\bell,\r\n\t\\fs, Pseq( (60..72), 1).midicps,\r\n\t\\t60, 1,\r\n\t\\pitchy, 4,\r\n\t\\dur, 0.25\r\n).play;\r\n)\r\n\r\n// marimba\r\n(\r\nPbind(\r\n\t\\instrument, \\bell,\r\n\t\\fs, Pseq( (60..72), 1).midicps,\r\n\t\\t60, 0.5,\r\n\t\\pitchy, 1,\r\n\t\\dur, 0.25\r\n).play;\r\n)",
   "is_private" : null,
   "id" : "1-5ay",
   "name" : "Modal synthesis of xilophone, marimba, glokenspiel, tubular bells",
   "author" : "nicolaariutti",
   "description" : "Example of modal synthesis made with a **Klank** UGEN as _resonator_ and white noise impulse as an _exciter_.\r\n\r\nAll resonators of the Klank UGEN are properly tuned to resamble modal  frequencies of a real bell I've recoded and analysed.\r\n\r\nThe ```fs```, ```pitchy``` and ```T60``` arguments are used to scale all the system in order to simulate various percussive instruments such as _xilophone_, _marimba_, _glokenspiel_ and _tubular bells_.",
   "ancestor_list" : []
}
