{
   "description" : "some playing around with m/c/g-transpose in Pbind. this stops after it 2 repetitions, but it could start at the beginning and go on forever - just change the last \"2\" in \\ctranspose to inf or however cycles you want. also, it uses a JPverb, so you need sc3_plugins, otherwise change rev line in reverbBus SynthDef to rev = input; or some other selfmade poor-woman's reverb.",
   "ancestor_list" : [
      "1-5cQ"
   ],
   "author" : "Luka P.",
   "name" : "Re: circling transpositions",
   "is_private" : null,
   "id" : "1-5cR",
   "code" : "( // pure melody experiments\r\nSynthDef(\"plucking\", {arg out = 0, amp = 0.1, freq = 440, decay = 5, coef = 0.1;\r\n\tvar env, snd;\r\n\tenv = EnvGen.kr(Env.linen(0, decay, 0), doneAction: 2);\r\n\tsnd = Pluck.ar(\r\n\t\tin: BrownNoise.ar(amp),\r\n\t\ttrig: Impulse.kr(0),\r\n\t\tmaxdelaytime: 0.1,\r\n\t\tdelaytime: freq.reciprocal,\r\n\t\tdecaytime: decay,\r\n\t\tcoef: coef);\r\n\tsnd = LeakDC.ar(snd).clip2;\r\n\tOut.ar(out, snd * env);\r\n}).add;\r\n\r\nb = Bus.audio(s,1);\r\n\r\nSynthDef(\"reverbBus\", { arg outBus = 0, inBus, wet = 0.1;\r\n\tvar input, rev;\r\n\tinput = In.ar(inBus,1);\r\n\trev = JPverb.ar(input * wet, t60:6, damp:0.5);\r\n\tDetectSilence.ar(rev, doneAction: Done.freeSelf); \r\n    Out.ar(outBus, input + (rev));\r\n}).add;\r\n\r\nr = Synth(\"reverbBus\", [\\inBus, b, \\wet, 0.5]);\r\n\r\nPbind(\r\n\t\\instrument, \"plucking\",\r\n\t\\scale, Scale.major.tuning_(\\just),\r\n\t\\octave, 4,\r\n\r\n\t\\degree, Pseq([1, 3, 7, 3,-4,-2, 7, 8, 1,-2, 2, 3], inf),\r\n\t\\mtranspose, Pseq([Pseq([0],144),Pseq([0],48),Pseq([3],48),Pseq([4],48)], inf),\r\n\t\\gtranspose, Pseq([Pseq([0],36),Pseq([4],36),Pseq([[-3]],36),Pseq([2],36)],inf),\r\n\t\\ctranspose, Pser([Pseries(-4,1,4) +.x Pseq([0], 144)],2),\r\n\r\n\t\\coef, Pseq([ Pseq([\r\n\t\t\tPrand([0.2,0.3,0.4,0.5],1),\r\n\t\t\tPrand([0.6,0.5],5),\r\n\t\t\tPrand([0.2,0.3],1),\r\n\t\t\tPrand([0.6,0.5],5)\r\n\t\t], 1),\r\n\t\t\tPrand([0.7,0.6],12)\r\n\t\t],inf),\r\n\t\r\n\t\\dur, Pseq([Prand([0.25,0.25,0.24,0.245,0.255,0.25], 140),0.26,0.3,0.4,0.7], inf)\r\n\t      * Pseq([Pseq([0.8],110), Pgeom(0.8,1.002,34)],inf), \r\n\r\n\t\\decay, Pseq([8, Prand([1,2,3,4], 4),3,2,1], inf),\r\n\r\n\t\\out, b, \\amp, 0.4,\r\n).play;\r\n)",
   "labels" : [
      "code fork",
      "slow",
      "melodic",
      "melodies",
      "arpeggiato"
   ]
}
