SuperCollider

From Wikipedia, the free encyclopedia
Jump to: navigation, search
This article is about the programming language. For other uses, see Supercollider.
SuperCollider
Developer(s) James McCartney and others
Initial release 1996
Stable release 3.6.5 / April 2013; 1 year ago (2013-04)
Operating system FreeBSD,[1] Linux, OS X, Windows
License GNU General Public License
Website http://supercollider.github.io/

SuperCollider is an environment and programming language originally released in 1996 by James McCartney for real-time audio synthesis and algorithmic composition.[2][3]

Since then it has been evolving into a system used and further developed by both scientists and artists working with sound. It is an efficient and expressive dynamic programming language providing a framework for acoustic research, algorithmic music, and interactive programming.[4]

Released under the terms of the GNU General Public License in 2002, SuperCollider is free software. The most recent major release (3.6.5) was released in April 2013.[5]

Architecture[edit]

Starting with version 3, the SuperCollider environment has been split into two components: a server, scsynth; and a client, sclang. These components communicate using OSC (Open Sound Control).[4]

SC Language combines the object oriented structure of Smalltalk and features from functional programming languages with a C family syntax.[4]

The SC Server application supports a simple C plugin API 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.[4]

The SuperCollider synthesis server (scsynth)[edit]

SuperCollider's sound generation is bundled into an optimised command-line executable (named scsynth). 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:[4]

  • Open Sound Control access
  • Simple ANSI C plugin API
  • Supports any number of input and output channels, including massively multichannel setups[6]
  • Gives access to an ordered tree structure of synthesis nodes which define the order of execution
  • Bus system which allows to dynamically restructure the signal flow
  • Buffers for writing and reading
  • Calculation at different rates depending on the needs: audio rate, control rate, demand rate

Supernova, an independent implementation of the Server architecture,[7] adds multi-processor support through explicit parallel grouping of synthesis nodes.

The SuperCollider programming language (sclang)[edit]

The SuperCollider programming language is a dynamically typed, garbage-collected, single inheritance object-oriented and functional language similar to Smalltalk,[3] with a syntax similar to Lisp or the C programming language. Its architecture strikes a balance between the needs of realtime computation and the flexibility and simplicity of an abstract language. Like many functional languages, it implements functions as first class objects, which may be composed. 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, and scope is both lexical and dynamic. Further features typical of functional languages are supported, including closure creation via partial application (explicit currying), tail call optimization, list comprehensions, and coroutines. Specifics include the implicit expansion of tuples and the stateless pattern system. Its constant time message lookup and real time garbage collection allows large systems to be efficient and to handle signal processing flexibly.[4]

By supporting methods of reflective, conversational, and literate programming, SuperCollider makes it relatively easy to find new sound algorithms[8] and to develop custom software as well as custom frameworks. With regards to domain specific knowledge, it is both general (e.g., it allows to represent properties such as time and pitch in variable degrees of abstraction) and copious of example implementations for specific purposes.[4]

GUI system[edit]

Screenshot of SuperCollider running the ixiQuarks GUI tools.

The SuperCollider language allows users to construct cross-platform graphical user interfaces for applications. The standard class library with user 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 generate vector graphics algorithmically.[9]

Interfacing and system support[edit]

Clients[edit]

Because the server is controlled using Open Sound Control (OSC), a variety of applications can be used to control the server. SuperCollider language environments (see below) are typically used, but other OSC-aware systems can be used such as Pure Data.[4]

"Third-party" clients for the SuperCollider server exist, including rsc3, a Scheme client, hsc3, based on Haskell, ScalaCollider,[10] based on Scala, and Overtone, based on Clojure.[11] 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.[4]

Supported operating systems[edit]

Screenshot of SuperCollider on Mac OS X with various user-generated GUI elements.

SuperCollider runs under Mac OS X, Linux, Windows and FreeBSD. The Windows version, however, tends to lag behind the others since most development is based on Mac and Linux. For each of these operating systems there are multiple language-editing environments and clients that can be used with SuperCollider (see below).[4]

It has also been demonstrated that SuperCollider can run on Android[12] and iOS.[13]

Editing environments[edit]

Screenshot of SuperCollider Vim on puredyne linux.

The Mac version of SuperCollider is most commonly used from within its own Mac-specific (Cocoa) interface; on Windows and Linux, various editors and a number of common development environments can be used, such as:

For each of the above environments, a plugin enables the real-time execution of SuperCollider code and interaction with the audio server.

Previous attempts to port SuperCollider to Windows have also resulted in a Python-based development environment (named PsyCollider), and a plug-in for the Eclipse IDE, but have not been updated recently. However, a new effort is currently undertaken to develop a cross-platform IDE based on the Qt framework.[16]

Code examples[edit]

// print "Hello world!"
"Hello world!".postln;
// play a mixture of an 800 Hz sine tone and pink noise
{ SinOsc.ar(800, 0, 0.1) + PinkNoise.ar(0.01) }.play;
// modulate a sine frequency and a noise amplitude with another sine
// whose frequency depends on the horizontal mouse pointer position
{ 
	var x = 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 function
f = { |x| if(x == 0) { 1 } { f.(x-1) * x } };

Live coding[edit]

As a versatile dynamic programming language, SuperCollider can be used for live coding, i.e. performances which involve the performer modifying and executing code on-the-fly.[17] Specific kinds of proxies 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.[18] Various extension libraries support different abstraction and access to sound objects, e.g. dewdrop_lib[19] allows for the live creation and modification of pseudo-classes and -objects.

See also[edit]

References[edit]

  1. ^ SourceForge.net: Files
  2. ^ J. McCartney, SuperCollider: A new real time synthesis language, in Proc. International Computer Music Conference (ICMC’96), 1996, pp. 257–258.
  3. ^ a b J. McCartney, Rethinking the computer music language: SuperCollider, Computer Music Journal, 26 (2002), pp. 61–68.
  4. ^ a b c d e f g h i j Scott Wilson; David Cottle; Nick Collins (2011). The SuperCollider Book. The MIT Press. ISBN 978-0-262-23269-2. 
  5. ^ SuperCollider Download Page
  6. ^ BEASTmulch tools for multichannel audio
  7. ^ T. Blechmann, supernova, a multiprocessor-aware synthesis server for SuperCollider, Proceedings of the Linux Audio Conference, Utrecht 2010.
  8. ^ J. Rohrhuber, A. de Campo and Renate Wieser. Algorithms Today. Notes on Language Design for Just in Time Programming. In Proceedings of the International Computer Music Conference, Barcelona, 2005.
  9. ^ The vector graphics interface is provided by the Pen class. Various examples can be found in Audiovisuals with SC, blog by Fredrik Olofsson, 02.05.2009 (updated 11.05.2012)
  10. ^ Rutz, H. H. (2010). "Proceedings of SuperCollider Symposium". Berlin. CiteSeerX: 10.1.1.186.9817.  |chapter= ignored (help)
  11. ^ More examples on the SuperCollider wiki
  12. ^ SuperCollider Android project on GitHub
  13. ^ Tiny Music System - Cylob Blog, 04.11.2009
  14. ^ SuperCollider with emacs: scel
  15. ^ Scate project
  16. ^ Cyberpipe @ Slovenia & the future SuperCollider development - announcement on the SuperCollider user mailing list, 22.02.2012
  17. ^ Collins, N., McLean, A., Rohrhuber, J. & Ward, A. (2003), Live Coding Techniques for Laptop Performance, Organised Sound 8(3): pp 321-30. doi:10.1017/S135577180300030X
  18. ^ J. Rohrhuber and A. de Campo. Waiting and uncertainty in computer music networks. In Proceedings of the International Computer Music Conference, Miami, 2004.
  19. ^ One of the numerous user contributed libraries known as "Quarks", and published in the SuperCollider Quarks repository.

External links[edit]