Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Musical Toys For Little Robots
name
code content
/*"Musical Toys For Little Robots" or "How I learned to stop worrying and love the proxy" http://soundcloud.com/unknown-artist-6/musical-toys-for-little-robots */ ~fx=Bus.audio(s,2); ( SynthDef(\mallet,{arg in=0,out=0,m=48,a=1,r=1,p=0; var sig=Array.fill(3,{|n| SinOsc.ar(m.midicps+(n*0.01),mul:a*0.3)}).sum; var env=EnvGen.kr(Env.perc(0.001,r),gate:1,doneAction:2); Out.ar(out,Pan2.ar(sig*env,pos:p)); }; ).add; SynthDef(\rev,{arg in=0,out=0; var sig=In.ar(in,2); sig=sig*0.8+CombC.ar(sig,0.5,0.3,0.5,0.2); Out.ar(out,sig) }; ).add; ) Synth(\rev,[\in:~fx]); ( fork{ var degrees=Prand([0,4,5,7,9,12],inf).asStream; var root=[36,48,60,72]; var x; x=Array.new; a=PatternProxy(Pseq([0+root.wchoose([0.3,0.4,0.2,0.1])],inf)); d=1/8; ~streams=[]; ~names={|pbind| ~streams=~streams++pbind.play(quant:1)}; ~names.value(Pbind(*[\instrument:\mallet, \m:a, \dur:d, \a:{rrand(0.4,1)*0.05}, \p:{rrand(-0.2,0.2)}, \r:{rrand(0.5,0.8)}, \out:~fx ])); 20.do({|n| x=x.add(degrees.next+root.wchoose([0.3,0.4,0.2,0.1])); x.postln; a.source=Pseq(x.scramble,inf); if ((n+1) % 6 == 0,{~names.value(Pbind(*[\instrument:\mallet, \m:Pcollect({arg inval;inval-[-24,12].choose},a), \dur:d, \a:{rrand(0.4,1)*0.05/(n+1)}, \p:{rrand(-0.2,0.2)}, \r:{rrand(0.5,0.8)}, \out:~fx ]));"new stream".postln}); (n+1).wait}); 19.do({|n| x.removeAt(0); x.postln; a.source=Pseq(x.scramble,inf); (19-(n+1)).wait;}); 4.wait; ~streams.do{|n| n.stop;2.wait}; } )
code description
An algorithmic/aleatoric composition for mallets and proxy patterns
use markdown for formating
category tags
comma separated, i.g. "wild, siren" (do not enter default SC class names, please)
ancestor(s)
comma separated identificators, i.g. "1-C,1-1,1-4M,1-x"
Private?
the code will be accessible by direct url and not visible in public activity
signup to submit public code without captcha
comment of change