| SuperCollider | |
|---|---|
| First appeared | 1996; 30 years ago (1996) |
| Stable release | |
| Implementation language | C++ |
| OS | FreeBSD,[2]Linux,macOS,Windows |
| License | GPL-3.0-or-later[3] |
| Website | supercollider |
SuperCollider is an environment andaudioprogramming language released originally in 1996 by James McCartney forreal-timeaudio synthesis andalgorithmic composition.[4][5]
Since then it has been evolving into a system used and further developed by both scientists and artists working with sound. It is adynamic programming language providing a framework foracoustic research,algorithmic music,interactive programming, andlive coding.
Originally released under the terms of theGPL-2.0-or-later in 2002, and from version 3.4 underGPL-3.0-or-later, SuperCollider isfree and open-source software.
Starting with version 3, the SuperCollider environment has been split into two components: aserver,scsynth; and aclient,sclang. These components communicate using OSC (Open Sound Control).[6]
The SC language combines theobject-oriented structure ofSmalltalk and features fromfunctionalprogramming languages with aC-familysyntax.[6]
The SC Server application supports simple C and C++pluginAPIs, making it easy to write efficient sound algorithms (unit generators), which can then be combined into graphs of calculations. Because all external control in the server happens via OSC, it is possible to use it with other languages or applications.[6]
SuperCollider's sound generation is bundled into an optimised command-line executable (namedscsynth). In most cases it is controlled from within the SuperCollider programming language, but it can be used independently. The audio server has the following features:[6]
Supernova, an independent implementation of the Server architecture,[8] adds multi-processor support through explicit parallel grouping of synthesis nodes.
The SuperCollider programming language is adynamically typed,garbage-collected,single-inheritanceobject-oriented, andfunctional language similar toSmalltalk,[5] with a syntax similar to the languagesLisp orC. Its architecture strikes a balance between the needs of real-time computing and the flexibility and simplicity of an abstract language. Like many functional languages, it implementsfunctions as first-class objects, which may becomposed. Functions and methods can have default argument values and variable length argument lists and can be called with any order of keyword arguments.Closures are lexical, andscope is both lexical and dynamic. Further features typical of functional languages are supported, including creating closures via partial application (explicitcurrying),tail call optimization,list comprehensions, andcoroutines. Specifics include the implicit expansion of tuples and the stateless pattern system. Its constant-time message lookup and real-timegarbage collection allows large systems to be efficient and to handle signal processing flexibly.[6]
By supporting methods ofreflective,conversational, andliterate programming, SuperCollider makes it relatively easy to find new sound algorithms[9] and to develop custom software and custom frameworks. Regarding domain specific knowledge, it is both general (e.g., it allows the representation of properties such as time and pitch in variable degrees of abstraction) and has copious example implementations for specific purposes.[6]

The SuperCollider language allows users to construct cross-platform graphical user interfaces for applications. The standardclass library withuser interface components may be extended by a number of available frameworks. For interactive programming, the system supports programmatic access to rich-text code files. It may be used to generatevector graphics algorithmically.[10]
Because the server is controlled usingOpen Sound Control (OSC), a variety of applications can be used to control the server. SuperColliderlanguage environments (see below) are typically used, but other OSC-aware systems can be used such asPure Data.[6]
Third-party clients for the SuperCollider server exist, including rsc3, aScheme client, hsc3, based onHaskell, ScalaCollider,[11] based onScala, Overtone, based onClojure, andSonic Pi.[12] These are distinct from the development environments mentioned below because they do not provide an interface to SuperCollider's programming language, instead they communicate directly with the audio server and provide their own approaches to facilitating user expression.[6]

SuperCollider runs onmacOS,Linux,Windows, andFreeBSD. For each of these operating systems there are multiple language-editing environments and clients that can be used with SuperCollider (see below).[6]
It has also been demonstrated that SuperCollider can run onAndroid[13] andiOS.[14]

SuperCollider code is most commonly edited and used from within its own cross-platform IDE, which isQt-based and supports Linux, Mac, and Windows.
Otherdevelopment environments with SuperCollider support include:
// 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({varx=SinOsc.ar(MouseX.kr(1,100));SinOsc.ar(300*x+800,0,0.1)+PinkNoise.ar(0.1*x+0.1)}.play;)
// List iteration: multiply the elements of a collection by their indices[1,2,5,10,-3].collect{|elem,idx|elem*idx};
// Factorial functionf={|x|if(x==0){1}{f.(x-1)*x}};
// «Pan Sonic emulation - Katodivaihe - lahetys» - Miguel Negrão({vara,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)
As a versatiledynamic programming language, SuperCollider can be used forlive coding, i.e. performances which involve the performer modifying and executing code on the fly.[18] Specific kinds ofproxies serve as high level placeholders for synthesis objects which can be swapped in and out or modified at runtime. Environments allow sharing and modification of objects and process declarations over networks.[19] Various extension libraries support different abstraction and access to sound objects, e.g. dewdrop_lib[20] allows for the live creation and modification of pseudo-classes and pseudo-objects.