Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: magic sparkly rainbow!!!!!!<3
name
code content
( s.newBusAllocators; s.options.numOutputBusChannels = 2; ~reverbBus = Bus.audio(s,2); s.waitForBoot({ Buffer.freeAll; ~scale1 = Buffer.loadCollection( s,Scale.new(#[0,7,15.93,5,9.7,12,17.5,13.1],12)); SynthDef(\rainbow,{ arg buf, samp=0.2,root=37,atk=0.1,decay=10, amp=0.3; var sig, index, tonic, freq, env; index = LFSaw.kr(samp).range(\bottom.ir(4),\top.ir(9)); index = index*BufFrames.kr(buf); tonic = DegreeToKey.kr(buf,index)+root; freq = tonic.midicps; env = EnvGen.ar(Env.perc(atk,decay,0.7,-2),doneAction:2); sig = SyncSaw.ar(root.midicps,freq, mul:0.5)*env; sig = BPF.ar(sig, \cfreq.kr(1000),\rq.ir(0.3))*amp; sig = Pan2.ar( sig, SinOsc.kr( \rate.kr(0.05).range(-0.9,0.9)+{Rand(-0.6,0.6)}), \level.kr(1), ); Out.ar(\out.ir(~reverbBus),sig); }).add; SynthDef(\reverb, { arg in=0, out=0, revdecay=5; var wet,dry, sig; wet = In.ar(~reverbBus,2); dry = In.ar(~reverbBus,2); wet = CombL.ar( wet, 0.1, SinOsc.kr(0.01).range(0.04,0.1), revdecay, 0.7); wet = LPF.ar(wet,\lpf.kr(4800)); sig = XFade2.ar(wet,dry,\mix.kr(0.2),\amp.kr(0.3)); Out.ar(out,sig); }).add; }); Synth(\reverb,[\mix,-0.5],addAction:'addToTail'); ~rainbow = Pbind( \instrument, \rainbow, \dur, Prand([0.2,1.3],inf), \buf, ~scale1, \root, Prand([23,30,35,37],inf), \amp, Pwhite(0.15,0.5,inf), \bottom, Prand([2,5],inf), \top, Pwhite(7.0,9.1,inf), \samp, Pexprand(0.07,0.5,inf), \rate, Pexprand(0.1,3,inf), \cfreq, Pseq([ Pseries(120,30,76), Pseries(2400,-30,76), ],inf), \rq, Pkey(\samp)+Pwhite(0.1,0.15,inf).asStream, \atk, Pexprand(0.04,0.3,inf), \decay, Pexprand(6,15,inf), \level, Env(#[0,1,0],#[100,110],'lin'), \out, ~reverbBus, ); ~rainbow.play; )
code description
some scale stuff by a novice-SC lovable unicorn
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