Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: alarm!
name
code content
s.options.memSize = 8192 * 8; ( SynthDef(\grain, {|out = 0, freq = 100, attack = 0, decay = 1, sustain = 0.1, distort = 0, fTime = 0.1, fFac = 1.2, amp = 1, delay = 0| var startFreq, endFreq, src, aEnv, fEnv; startFreq = fFac * freq; endFreq = freq; aEnv = EnvGen.ar(Env.perc(attack, decay), timeScale: sustain, doneAction: 2, levelScale: amp); fEnv = EnvGen.ar(Env([startFreq, endFreq], [fTime])); src = SinOsc.ar(fEnv, 1, mul: 1 + distort).wrap2(1); Out.ar(out, DelayN.ar(src * aEnv!2, 0.1, delay)) }).add ) ( Pdef(\grainer, Pbind( \radiation, Pseq([ Pseq([10] ++ (0.1 ) ++ [10] ++ (0.1!6), 1), Pseq([ 1] ++ (0.1!6) ++ [ 1], inf) ]), \instrument, \grain, \freq, ([1200, 800, 600, 200]!12).flat.collect{|v| v * rrand(0.99, 1)} * Prand([4, 1, 2, 3, 4, 8], inf), \fTime, 0.0125, \fFac, 5, \sustain, 0.1, \attack, 0.0005, \decay, 2, //\distort, {Pwhite(0.1, 5.0)}!(12 * 4), \amp, 0.1, \delay, {Pwhite(0.01, 0.1)}!(12 * 4), \dur, Pkey(\radiation) )).play ) Pdef(\grainer).stop
code description
Good Morning! Inspired by a Nokia alarm clock sound from one of their non-smartphone mobiles, I designed an alarm clock sound for your mobile. The basic idea is to start with a very simple and short grain, giving you a chance to reach for the phone and turn it off before it starts to get annoying.
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