Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: alarms
name
code content
//--set alarms ( ~num= 25; //number of alarms ~fadeTime= 10; //fade in time in seconds ~num.do{|i| Ndef(("alarm"++i).asSymbol, {|amp= 0, lag= 5| var src= Pulse.ar( ExpRand(300, 3000)+LFPulse.kr(ExpRand(3, 30), 0, Rand(0.4, 0.6), Rand(-100, 100)), Rand(0.4, 0.6), LFPulse.kr(LinRand(0.05, 2), 0, LinRand(0.1, 0.5), 0.5) ); Pan2.ar(src, Rand(-0.95, 0.95), amp.lag(lag)); }); }; Ndef.all; //list them ) //--start alarms (takes a while) ( ~task.stop; ~task= Task({ ~num.do{|i| Ndef(("alarm"++i).asSymbol).play(fadeTime: ~fadeTime).set(\amp, 7/~num).postln; i.linlin(0, ~num-1, ~fadeTime*2, ~fadeTime/2).wait; }; }).play; ) //--stop alarms ( ~task.stop; ~task= Task({ ~num.do{|i| Ndef(("alarm"++i).asSymbol).stop(fadeTime: 1/~fadeTime); i.linlin(0, ~num-1, 1/~fadeTime, 10/~fadeTime).wait; }; }).play; )
code description
i wrote this for a sleeping bag concert in stockholm nov 2010. never set it off in the end as planned.
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