{
   "ancestor_list" : [],
   "description" : "some playing around with m/c/g-transpose in Pbind. this stops after it has transposed 6 times a semitone up, but it could start at the beginning and go on forever - just change the last \"1\" 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.",
   "name" : "circling transpositions",
   "author" : "Luka P.",
   "id" : "1-5cQ",
   "is_private" : null,
   "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\t\\degree, Pseq([1,3,7,8], inf), // four main notes\r\n\t\\mtranspose, Pseq([Pseq([0],3),Pseq([-5],3)],inf), // switched mode every 3 notes (*2)\r\n\t\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,6) +.x Pseq([0], 144)],1),\r\n\r\n\t\\coef, Pser([Prand([0.2,0.3,0.4,0.5],1), Prand([0.8,0.7,0.6,0.5],11)], inf),\r\n\t\\dur, Prand([0.25,0.26,0.24,0.255,0.255,0.25], inf) * 0.9, \r\n\t\\decay, Prand([1,2,3,4,5], inf),\r\n\t\\out, b, \\amp, 0.4,\r\n).play;\r\n)",
   "labels" : [
      "slow",
      "melodic",
      "melodies",
      "arpeggiato"
   ]
}
