Diff from random patterns by grirgz (11 Nov'15 19:12) to Pi sonification by grirgz (14 Nov'15 19:07)

name
randomPi psonificatterions
description
Ithis generatake vegryoups of 10 divercimalse cfrompos Pitions, tweakingd iuse easy and cha ngumber as lotan the souinds gex ine arrated,ys addingof bepatter synthdes. If canyou imparove fubortherd theby spi, you cand. A lotry to thexplore hnumberes
code
( ~decimals = "31415926535897932384626433832795028841971693993751058209749445923078164062862" "089986280348253421170679821480865132823066470938446095505822317253594081284811" "174502841027019385211055596446229489549303819644288109756659334461284756482337" "867831652712019091456485669234603486104543266482133936072602491412737245870066" "063155881748815209209628292540917153643678925903600113305305488204665213841469" "519415116094330572703657595919530921861173819326117931051185480744623799627495" "673518857527248912279381830119491298336733624406566430860213949463952247371907" "021798609437027705392171762931767523846748184676694051320005681271452635608277" "857713427577896091736371787214684409012249534301465495853710507922796892589235" "420199561121290219608640344181598136297747713099605187072113499999983729780499" "510597317328160963185950244594553469083026425223082533446850352619311881710100" "031378387528865875332083814206171776691473035982534904287554687311595628638823" "537875937519577818577805321712268066130019278766111959092164201989380952572010" "654858632788659361533818279682303019520353018529689957736225994138912497217752" "834791315155748572424541506959508295331168617278558890750983817546374649393192" "550604009277016711390098488240128583616035637076601047101819429555961989467678" "374494482553797747268471040475346462080466842590694912933136770289891521047521" "620569660240580381501935112533824300355876402474964732639141992726042699227967" "823547816360093417216412199245863150302861829745557067498385054945885869269956" "909272107975093029553211653449872027559602364806654991198818347977535663698074" "265425278625518184175746728909777727938000816470600161452491921732172147723501" "414419735685481613611573525521334757418494684385233239073941433345477624168625" "189835694855620992192221842725502542568876717904946016534668049886272327917860" "857843838279679766814541009538837863609506800642251252051173929848960841284886" "269456042419652850222106611863067442786220391949450471237137869609563643719172" "874677646575739624138908658326459958133904780275900994657640789512694683983525" "957098258226205224894077267194782684826014769909026401363944374553050682034962"; SynthDef(\blo, { arg out=0, amp=0.1, gate=1, pan=0, freq=200; var sig; sig = SinOsc.ar(freq*[1,1.001]); sig = sig * EnvGen.ar(\adsr.kr(Env.adsr(0.01,0.1,0.8,0.1)),gate,doneAction:2); sig = Pan2.ar(sig, pan, amp); Out.ar(out, sig); }).add; SynthDef(\raid, { arg out=0, amp=0.1, gate=1, pan=0, freq=200; var sig; sig = LFSaw.ar(freq * [1,1.001]); sig = RLPF.ar(sig, freq*2); sig = sig * EnvGen.ar(\adsr.kr(Env.adsr(0.01,0.1,0.8,0.1)),gate,doneAction:2); sig = Pan2.ar(sig, pan, amp); Out.ar(out, sig); }).add; SynthDef(\raid2, { arg out=0, amp=0.1, gate=1, pan=0, freq=200; var sig; var sig1, sig2, sig3, sig4, sig5, sig6, sig7, sig8; var env1 = EnvGen.kr(Env([1,2,1],[0.01,0.8]), 1); sig = LFSaw.ar(freq * [1,1.001, 1 + Rand(0,0.0001)]); sig1 = (sig * Rand(1,100)).wrap2(1)/2; sig = SelectX.ar( SelectX.kr(ExpRand(0.001,1), [ LFSaw.kr(1/8).range(0,1), SinOsc.kr(freq % 64 / 8).range(0,1), ]) , [sig, sig1]); sig = RLPF.ar(sig, freq*env1 * [1,1 + Rand(0,0.1),2,1.01]); sig = sig * EnvGen.ar(\adsr.kr(Env.adsr(0.01,0.1,0.8,0.1)),gate,doneAction:2); sig = Pan2.ar(sig, pan, amp).flop; Out.ar(out, sig); }).add; SynthDef(\raid3, { arg out=0, amp=0.1, gate=1, pan=0, freq=200, spoon; var sig; var xfreq; var env1 = EnvGen.kr(Env([1,2,1],[0.01,0.8]), 1); env1 = 1; xfreq = freq * ( 1 + ( SinOsc.ar(Rand(100,500)) * Rand(0.1,3) )); xfreq = [xfreq, freq]; sig = LFSaw.ar(xfreq *.t [1,1.001, 1 + Rand(0,0.0001)]); sig = SelectX.ar( spoon.range(0,1), sig); sig = RLPF.ar(sig, freq*env1 * [1,1 + Rand(0,0.1),2,1.01]); sig = HPF.ar(sig, 100); sig = sig * EnvGen.ar(\adsr.kr(Env.adsr(0.01,0.1,0.8,0.1)),gate,doneAction:2); sig = Pan2.ar(sig, pan, amp).flop; //sig = sig * 0.5; Out.ar(out, sig); }).add; ); ( PdSynthDef(\vache, { arig out=0, Pamp=0.1, gate=1, pan=0, fr( 5.collecq=200, t({otem=1, spoon; Plvazy({r sig; var xsig1, =sig2, [ 1sig3, sig4.rand, sig5, sig6, sig7, sig8; 14totem = totem.ranfold(0,8)/8; 14//totem.rand,poll; freq = freq * [14,1+spoon.randge(0.0001, 0.001),1]; Pfsig1 = SinduOsc.ar(8.frand+1,eq); Pbsindg2 = LFSaw.ar(freq); \sing3 = LFPulste.arum(frent, [q); \bsig = SelectX.ar( spo, \on.range(0,2), [sidg1, \ra sidg2, sig3]); \rsig = RLPF.ar(sid3g, \d spoon.range(1/4,4) * faultreq, ].ch spoosn.range(0.3,0.8)); \lesigato,1 = sig1.0fold2(spoon.rand + ge(1,0.1,)); \adsig = SelectX.ar,( Pspoon.rangeq(1,0), [sig, sig1]); [ [sig = sig * EnvGen.ar(Env.adsr(0.01,0.1,0.8,0.1) ],gate,doneAction:2); [sig E= Panv2.adsr(0.2sig, (spoon+[0.1,0.8,07]).fold(-1,1) ], amp).flop; [ EnvOut.adsr(0out, sig); }).0add; SynthDef(\vache2, { arg out=0, amp=0.1, gate=1, pan=0.8, freq=20.3)0, ]totem=1, spoon; [ Env.adr sig; var(0.0 sig1, sig2,0.1 sig3,0. sig4, sig5, sig6,0.7) ]sig7, sig8; var mfreq; ]totem = totem.chfold(0,8)/8; //tostem.poll; ]//freq = freq * [1,i1+spoonf.range(0.0001,0.001),1]; \d//fregq = free,q * [0,5].midiratio; Psmfreq(x.k = freepq * (2), 1 + ( Sinf), POsc.ar(freq * Rand(x[[1,1.1)) * ( spoon+[0,10.3,20.7]],inf ).fold(0.1,2) )); Pseq(x,ing1 = LFSaw.ar(mfreq),; Pseq(x.mig2 = LFSaw.arror,in(mfreq * 1/2),; sig3 = LFPulseq({x.choose}!4,inar(mfreq),; Psig = Seq({x.lechtX.ar( spoosn.range}!(0,2), [sig1, sinf)g2, sig3]); ].choo//sig = Se, \olectX.ave,r( ( spoon+[30,41,5,61.3] ).chfoold2(0,1), [seig, sig1]); \sig1 = sig1.foldu2(spoon.range(1, [0.1)); Psig = SeqlectX.ar([2**8 spoon.rand/8ge(1,0), 1/4][sig, sinfg1]),; //sig = RLPF.ar(seqig, ([2**8 spoon.randge(1/8]4,in4) * freq ), ].ch spoosn.range(0.3,0.8)); \sig = HPF.ampr(sig, (spoon+0.5).fold(1/4 ,4) * freq); sig = sig * EnvGen.ar(Env.adsr(0.01,0.1,0.8,0.1),gate,doneAction:2); }sig = Pan2.ar(sig, (spoon+1.7).fold(-1,1), amp).floop; }Out.ar(out, sig); }) ).playdd; ); ( Pd~gef(\cnpat = { arig str, id=0; Ppar( 5.collect({ Plazy({ var xa = [ 14.stra.nd,extN(10); 14.rvar spoon = Nd, 14.raef(( \spoon++id ).asSymbol, 14 { SinOsc.kr(1/and,[5] * ( (a[0]+1)/5 )) }); ]a.debug("In"); Pfindur(8.rand[5]+1, Pbind( \instrument, [ \blovache, \rvaidche2, \blo, \raid2, \raid32, \default, \raid3, ].choosewrapAt(a[0]), \legato, 1.0.rand[8]/5 + 0.1, \totem, Ptime(), \spoon, spoon, \adsr, Pseq([ [ [ Env.adsr(0.1,0.1,0.8,0.1) ], [ Env.adsr(0.2,0.1,0.8,0.1) ], [ Env.adsr(0.02,0.1,0.8,0.3) ], [ Env.adsr(0.02,0.1,0.6,0.7) ], ].choosewrapAt(a[1]) ],inf), \root, -4, \degree, [ Pseq({xa.chookeep(2),inf), Pse}!q(a[[1,0,1,2]],inf), Pseq(a,inf), Pseq({xa.chmirroose}!1r,inf), Pseq({xa.chdroosp(2).ke}!ep(4),inf), Pseq({xa.choose}!3(a[6]+1),inf), ].choosewrapAt(a[2]), \octave, [3,4,5,6].choowrapAt(a[3]), \isRest, [ \ Pseq(a.keep(2).collect({ arg, [0,1/x; x < 4 }),1/8inf),0] Pseq(a.keep(4).choosllect({ /arg 2x; x > 4 }),inf), \lfaglse, 1 ].0.wrand / 16pAt(a[9]), \isRestdur, [ Pseq([1,2**a[7].wrap(0,0.56)/8,0.3 1/4],inf).coin.not, \duPseq([2**a[7].wrap(0,4)/8, [1/4],inf), Pseq([2**2a[7].wrandp(0,4)/8, 1/48],inf), Pseq([2**4a[7].wrand/8p(0, 15)/8],inf), //Pseq([2**8.rand/8],inf), ].choosewrapAt(a[4]), \amp, 0.1/4 ) ) }).loop }); // test //~str = Prand([1,2,3,6,5,6,4,2,9],inf).asStream; //~genpat.(~str).loop.play; ); //// GO ! ( ~str = Pseq( ~defcimals.as(\Array).collect(_.asString.asInteger) ).asStream; // pi decimals //~str = Prand((0..9),inf).asStream; // same with random decimals Pdef(\soni, Ppar( 54.collect( { arg i; Plspazywner({ arg sp; vinf.do { arg x = [; 14sp.raseq(~gendpat.(~str), i); 14.rand,} 14.rand,}) 14} )).rpland,y; ];) Pfindur(8.rand+1,//////////////////////////////////////////////////////////// Pbind( \/// if you wanst other decimals, you can computen t,hem [ \with bloc, \r scale id, \s numbera of decimals (could2, be long) \raid3,( \~get_defcimauls = { arg count, formula; ]."echoo 'se, \caleg=%; %' | bc -l".format(count, 1.0.formula).unixCmd + 0GetStdOut.1, \adsr, Pseqop([-1) [ [ Env.adsreplace(0".1",0.1,0.8,0.1"") ], [ Env.adsreplace(0.2"\n",0.1,0.8,0.1"") ], [ Env.adsreplace(0.02"\\",0.1,0.8,0.3 ""); ], [}; ) // Env.pi ~decimals = ~get_decimalsr(0.0(2,0.1,0.6,0.7) ], "4*a(1)") ].choo// square ] root of 2, i like it better thanf), pi \~decimals = ~gret_decimals.(2000, [ P"seqrt([x.choose],inf2),") ].choos// try le, \ss randoctm pavttern, [3,4,5,6].each fractioon has its little, song //\l~decimag,ls [= ~get_decimals.(2000, "1/4,/13") /8,0]./ choopy paste /to 2, //\lag, 1.0.raneduce /compute 16,time \~decimalsRe.asCompileSt, [ring; P ~decimals = ~geqt_decimals.([20.51,0.51,0.50, "s(0.5)"); // sin(0].5) ( ~decoin.malsInte = ~ger.t_decimals.(2000, "2/12345"); ~decrimals.asCombpile,Strinf)g.codebug("playin.not,g"); //~str = Pseq([0 ~decimals.51]as(Array).collect(_.asString.asInteger) ).ascStreamble,; // pinf). decoin.not, fmalse, ].choo//~se, \dutr, [ = Pseq([2**2.rand/8((0..9), 1/4],inf), 1.asStream; /8, //P sameq([2**4. with rand/8,om 1/8],decinf),mals //Psdeqf([2**8.ra\sond/8],inf), Ppar( ]4.chooslle,ct { arg i; \amPsp,awner({ 0.1/4arg sp; )inf.do { arg x; sp.seq(~genpat.(~str), i); }).loop }) )} )).play; );
category tags
code fork
ancestors
1-50t