{
   "code" : "// define the violin-like sound synth\r\n(\r\nSynthDef(\\violin, {\r\n\t| midinote=60, gate=1, amp=0.25 |\r\n\tvar env = EnvGen.kr(Env.asr(0.1, 1, 0.1), gate, doneAction:2);\r\n\tvar sig = VarSaw.ar(\r\n\t\tmidinote.midicps,\r\n\t\twidth:LFNoise2.kr(1).range(0.2, 0.8)*SinOsc.kr(5, Rand(0.0, 1.0)).range(0.7,0.8))*0.25;\r\n\tsig = sig * env * amp;\r\n\tOut.ar(0, sig!2);\r\n}).add;\r\n)\r\n\r\n\r\n// play a chord (farfisa-like sound)\r\n(\r\n[60, 64, 67].do ({\r\n\t| note |\r\n\tSynth(\\violin, [\\midinote, note]);\r\n})\r\n)\r\n\r\n// play a single note (it seems also a flute!)\r\nx = Synth(\\violin, [\\midinote, 84]);\r\nx.set(\\gate, 0); // stop the note\r\n\r\n\r\n// play some random notes\r\n(\r\np = Pbind(\r\n\t\\instrument, \\violin,\r\n\t\\midinote, Prand( Scale.majorPentatonic.degrees, inf) + 60,\r\n\t\\dur, 3,\r\n\t\\legato, 1\r\n).play;\r\n)",
   "is_private" : null,
   "id" : "1-5as",
   "labels" : [
      "organ",
      "violin",
      "synthetic",
      "flute"
   ],
   "ancestor_list" : [],
   "description" : "Trying to procedurally synthetise a violin, I eventually came out with a \"Farfisa\" organ like sound.\r\nIt can be used also as a flute!",
   "name" : "farfisa organ like sound",
   "author" : "nicolaariutti"
}
