Submit
Browse
Anonymous
Login
RSS
SuperCollider Code
Fork Code: Nested ifs in a SynthDef
name
code content
( { var noise, out; noise = LFNoise0.kr(8); out = if( noise > 0.0, if(noise > 0.5, if(noise > 0.9, WhiteNoise.ar(0.2), Pulse.ar(60, 0.5, 0.4)), SinOsc.ar(500, 0, 0.25) ), Saw.ar(160, 0.5) ); out ! 2 }.play; )
code description
A short, silly example of using if in a SynthDef. Using Select is generally a better thing to do.
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