{
   "author" : "p.dupuis",
   "name" : "Re: Kalimba",
   "ancestor_list" : [
      "1-51l"
   ],
   "description" : "Here is a slightly thinner sounding version of snappizz's kalimba SynthDef. I added filtering on the SinOsc and on the PinkNoise. IMO it sounds better if the mix stays low.",
   "labels" : [
      "code fork",
      "instrument",
      "pluck",
      "kalimba",
      "plucked"
   ],
   "code" : "(\r\nSynthDef(\\kalimba, {\r\n    |out = 0, freq = 440, amp = 0.1, mix = 0.1|\r\n    var snd, click;\r\n    // Basic tone is a SinOsc\r\n    snd = SinOsc.ar(freq) * EnvGen.ar(Env.perc(0.03, Rand(3.0, 4.0), 1, -7), doneAction: 2);\r\n\tsnd = HPF.ar( LPF.ar(snd, 380), 120);\r\n    // The \"clicking\" sounds are modeled with a bank of resonators excited by enveloped white noise\r\n\tclick = DynKlank.ar(`[\r\n        // the resonant frequencies are randomized a little to add variation\r\n        // there are two high resonant freqs and one quiet \"bass\" freq to give it some depth\r\n        [240*ExpRand(0.97, 1.02), 2020*ExpRand(0.97, 1.02), 3151*ExpRand(0.97, 1.02)],\r\n        [-9, 0, -5].dbamp,\r\n        [0.8, 0.07, 0.08]\r\n\t], BPF.ar(PinkNoise.ar, 6500, 0.1) * EnvGen.ar(Env.perc(0.001, 0.01))) * 0.1;\r\n\tsnd = (snd*mix) + (click*(1-mix));\r\n\tsnd = Mix( snd );\r\n    Out.ar(out, Pan2.ar(snd, 0, amp));\r\n}).add;\r\n)\r\n\r\n(\r\nPbind(\r\n    \\instrument, \\kalimba,\r\n    \\dur, Pseq([0.3, 0.15], inf),\r\n\t\\stretch, 1.3,\r\n    \\amp, 0.5*(2**Pgauss(0, 0.1)),\r\n    \\degree, Pseq([0, -3, [1, 4], 2, Rest, 1, -3, -2, -4, -2, [0, 5], 1, Rest, 0, -2, Rest], inf)\r\n).play;\r\n)",
   "is_private" : null,
   "id" : "1-51n"
}
