Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
SuperCollider
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Code examples== <syntaxhighlight lang="sc"> // play a mixture of pink noise and a sine tone of 800 Hz { SinOsc.ar(800, 0, 0.1) + PinkNoise.ar(0.01) }.play; // modulate the frequency of the sine tone and the amplitude of the noise signal with another sine signal, // the frequency of which depends on the horizontal position of the mouse pointer ( { var x = SinOsc.ar(MouseX.kr(1, 100)); SinOsc.ar(300 * x + 800, 0, 0.1) + PinkNoise.ar(0.1 * x + 0.1) }.play; ) </syntaxhighlight> <syntaxhighlight lang="sc"> // List iteration: multiply the elements of a collection by their indices [1, 2, 5, 10, -3].collect { |elem, idx| elem * idx }; </syntaxhighlight> <syntaxhighlight lang="sc"> // Factorial function f = { |x| if(x == 0) { 1 } { f.(x-1) * x } }; </syntaxhighlight> <syntaxhighlight lang="sc"> // «Pan Sonic emulation - Katodivaihe - lahetys» - Miguel Negrão ( { var a, b, c, d, n, e, f, out; a = Impulse.ar(8)*1.5; b = WhiteNoise.ar * Env([1.0,1.0,0.0],[0.01,0.01],\step).ar(0, Impulse.ar(1 )) ; b = FreeVerb.ar(b, 0.5, 0.4)*2.5; c = SinOsc.ar(40) * Env.perc(0.01,0.2).ar(0, TDuty.ar(Dseq([1/4,1/2,1/8,1/8],inf))); 5.do{ c = (c.distort + c)*0.75}; c = c * 1.5; d = LPF.ar(Saw.ar([20,47]).sum , XLine.ar(4000,200,0.5)) * Env.perc.ar(0, Impulse.ar(1/16)) * 0.5; d = (GVerb.ar( d , roomsize:10, revtime:6) * 200).clip(-1.0,1.0) * 0.3; n = 12; e = ( Saw.ar( 40*(1..n) * ({ LFNoise1.ar(0.1).range(1,1.01) } ! n) ) * ({ LFNoise1.ar(0.1).range(0.0,1.0) }!n)).sum * 10; e = CombC.ar(e, 0.1, 0.1, 4) + e; e = e.tanh * 0.3 * SinOsc.ar(0.05).range(0.5,1.0); e = e.dup; e = e * SinOsc.ar(0.03).range(0.2,1.0) * 0.5; f = Blip.ar(100) * Blip.ar(100) * Env([0.0,0.0,1.0],[8,8],[\step,\linear,\step]) .ar(0, Impulse.ar(1/16)) * 2 ; out = ((a + b + c + f) ! 2) + d + e; out = out * 0.2 }.play ) </syntaxhighlight>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)