{
   "description" : "( Requires the theory quark from https://github.com/shimpe/theoryquark ) Moments before life support was to fail, a supercollider satellite was ejected into deep space lamenting their brave but foolish undertaking. Eons later it still floats in empty space, sole witness of times long gone by. To install the quark, just unpack it in the directory that opens when you open scide -> \"file menu\" -> \"open user support directory\" and then restart scide (or recompile the class library using the \"language\" -> \"recompile class library\" menu)",
   "ancestor_list" : [],
   "author" : "56228375",
   "name" : "Lamento",
   "id" : "1-57Z",
   "is_private" : null,
   "code" : "(\r\ns.options.memSize_(16384);\r\ns.reboot;\r\n)\r\n\r\n(\r\ns.waitForBoot({\r\n\tvar parser = TheoryNoteParser.new;\r\n\r\n\tSynthDef(\\pad, {\r\n\t\t| out = 0, freq = 440, gate=1, a = 0.1, s = 3, r = 1|\r\n\t\tvar freqs = { freq * LFNoise2.kr(freq:1,mul:0.01,add:1) }!24;\r\n\t\tvar gen = LFSaw.ar(freq:freqs) * 0.1;\r\n\t\tvar fmod = 1;\r\n\t\t//var fmod = LFCub.kr(freq:1/12).range(1, LFNoise2.kr(freq:1).range(6,7)); // sharper sound\r\n\t\tvar rqmod = LFNoise2.kr(freq:1/8).range(0.1,1.0);\r\n\t\tvar modspeed = 1/s;\r\n\t\t//var modspeed = 10; // tremolo sound\r\n\t\t//var modspeed = 10k*LFNoise2.ar(freq:4/s); // wobble sound (works best with sharper sounding pad)\r\n\t\tvar snd = RLPF.ar(in:gen, freq:SinOsc.kr(modspeed).range(freqs*0.8, freqs*1.2) * fmod, rq:rqmod);\r\n\t\tvar env = EnvGen.ar(Env.new(levels:[0,1,1,0], times:[a, s, r]), gate, doneAction:2);\r\n\t\tOut.ar(bus:out, channelsArray:env*Splay.ar(snd));\r\n\t}).add;\r\n\r\n\tSynthDef(\\flute, {\r\n\t\t| out = 0, freq = 440, amp = 1.0, a = 0.1, r = 0.1|\r\n\t\t//var fmod = 1; // clean\r\n\t\t//var fmod = LFCub.kr(freq:1/12).range(1, LFNoise2.kr(freq:12.0).range(1,1.1)); // tone deaf flute\r\n\t\tvar fmod = LFCub.kr(freq:1/12).range(1, LFNoise2.kr(freq:12.0).range(1,1.02)); // flute-like sound\r\n\t\tvar env = EnvGen.ar(Env.perc(a, r), levelScale:0.5, doneAction:2);\r\n\t\tvar snd = SinOsc.ar(freq * fmod)!2;\r\n\t\tOut.ar(bus:out, channelsArray:(env*(amp*snd).tanh));\r\n\t}).add;\r\n\r\n\ts.sync;\r\n\r\n\tp = Pbind(\r\n\t\t\\instrument, \\pad,\r\n\t\t\\freq, Pseq([\r\n\t\t\tPseq([\r\n\t\t\t\t\"c2 g3 eb4 g4\",\r\n\t\t\t].collect({|el| parser.asMidi(el).midicps}), 1),\r\n\t\t\tPseq([\r\n\t\t\t\t\"g2 g3 d4 f4 g4\",\r\n\t\t\t\t\"c3 g3 eb4 g4 c5\",\r\n\t\t\t\t\"f2 f4 ab4 c5 eb5\",\r\n\t\t\t\t\"eb2 c4 eb4 g4\",\r\n\t\t\t\t\"g2 d4 f4 g4 b4 d5\",\r\n\t\t\t\t\"ab2 c4 eb4 ab4\",\r\n\t\t\t\t\"f2 c4 f4 g4 ab4 f5\",\r\n\t\t\t\t\"c2 g3 eb4 g4 eb5\",\r\n\t\t].collect({|el| parser.asMidi(el).midicps}), inf)], 1),\r\n\t\t\\dur, Pseq([5],inf),\r\n\t\t\\s, Pkey(\\dur),\r\n\t\t\\a, 0.4\r\n\t);\r\n\r\n\tq = Pbind(\r\n\t\t\\instrument, \\flute,\r\n\t\t\\freq, Pxrand(parser.asMidi(\"c5 eb5 g5 bb5 c6\").midicps ++ [Rest(), Rest()], inf),\r\n\t\t\\dur, Pbrown(lo:0.1,hi:1.0, step:0.125, length:inf),\r\n\t\t\\a, Pkey(\\dur)*0.8,\r\n\t\t\\amp, Pseq([\r\n\t\t\tPseq((((1..16)/16)*0.5), 1),\r\n\t\t\tPbrown(lo:0.3,hi:0.6,step:0.1,length:inf)], inf\r\n\t));\r\n\r\n\te = Ptpar([0.0, p, 8*5.0, q]).play;\r\n\r\n});\r\n\r\n)",
   "labels" : [
      "pad",
      "sad",
      "theoryquark"
   ]
}
