You are on page 1of 4

Csound

Csound is a computer programming language for sound, also known as


Csound
a sound compiler or an audio programming language, or more precisely,
an audio DSL. It is called Csound because it is written in C, as opposed to Initial release 1986[1]
some of its predecessors. Stable release 6.12.0[2] /
October 24, 2018
It is free software, available under the LGPL.
Repository github.com
Csound was originally written at MIT by Barry Vercoe in 1985, based on /csound/csound
his earlier system called Music 11, which in its turn followed the MUSIC- (https://github.co
N model initiated by Max Mathews at the Bell Labs. Its development m/csound/csoun
continued throughout the 1990s and 2000s, led by John Fitch at the d)
University of Bath. The first documented version 5 release is version 5.01
on March 18, 2006. Many developers have contributed to it, most notably
Written in C
Istvan Varga, Gabriel Maldonado, Robin Whittle, Richard Karpen,
Michael Gogins, Matt Ingalls, Steven Yi, Richard Boulanger, and Victor
Operating system Cross-platform
Lazzarini. License LGPL
Website csound.com (htt
Developed over many years, it currently has nearly 1700 unit generators.
p://csound.com)
One of its greatest strengths is that it is completely modular and
extensible by the user. Csound is closely related to the underlying
language for the Structured Audio extensions to MPEG-4, SAOL.

Contents
Csound code
Csound 5
Csound 6
Csound For Live Performance
Front-ends: IDEs and music composition environments
One laptop per child (OLPC)
See also
References
Further reading
External links

Csound code
Csound takes two specially formatted text files as input. The orchestra describes the nature of the instruments and the
score describes notes and other parameters along a timeline. Csound processes the instructions in these files and
renders an audio file or real-time audio stream as output.

The orchestra and score files may be unified into a single structured file using markup language tags (a CSD file with
filename extension .csd). Here is a very simple example of a unified Csound data file which produces a wave file
containing a one-second sine wave tone of 1 kHz at a sample rate of 96 kHz:
<CsoundSynthesizer>

<CsOptions>
csound -W -d -o tone.wav
</CsOptions>

<CsInstruments>
sr = 96000 ; Sample rate.
kr = 9600 ; Control signal rate.
ksmps = 10 ; Samples per control signal.
nchnls = 1 ; Number of output channels.

instr 1
a1 oscil p4, p5, 1 ; Oscillator: p4 and p5 are the arguments from the score, 1 is the table number.
out a1 ; Output.
endin
</CsInstruments>

<CsScore>
f1 0 8192 10 1 ; Table containing a sine wave. Built-in generator 10 produces a sum of sinusoids, here
only one.
i1 0 1 20000 1000 ; Play one second of one kHz at amplitude 20000.
e
</CsScore>

</CsoundSynthesizer>

As with many other programming languages, writing long programs in Csound can be eased by using an integrated
environment for editing, previewing, testing, and debugging. The one now officially supported is CsoundQt, and it has
many features, such as automatic code insertion, integrated documentation browser, integrated widgets for
graphically controlling parameters in realtime, plus a button for playing the code.

Csound 5
Version 5.01 was released on March 18, 2006 – 20 years after csound's first release. Csound 5 is available in binary
and source code for Linux, Microsoft Windows and Mac OS X from the SourceForge Csound project.[3] It is much
improved and expanded compared to the original software, effectively made into a software library with an API. A
variety of front ends have been developed for it. In addition to the basic C API, there are also Python, Java, Lisp, Tcl
and C++ among other bindings, like one from Haskell which allows control of Csound from a purely functional
environment.

The use of plug-ins allows additional capabilities without modifications to the Csound code, as there is the possibility
to write user-defined opcodes as extensions to the original language. LADSPA and DSSI are supported, but VST
support has been removed.

Real-time performance through MIDI was added in the 1990s. Another addition was the support of FLTK widgets
(graphical interface components with sliders, knobs, etc.) for controlling real-time audio, and integration of custom
graphical interfaces written in Python.

Csound 6
Csound 6 has been in development since its features were hashed out at the Csound Conference held in 2011 in
Hanover. Csound 6 was released in July 2013 and is now available on GitHub.[4] Csound 6 is also available for
Android. The major new features of Csound 6 include:

A bison/flex based parser for the Csound language is now standard. It generates an abstract syntax tree that is
accessible via the Csound API. The tree can then be compiled to a Csound performance runtime using the API.
Therefore, after the tree has been compiled, it can be manipulated by user code before compiling it to a Csound
performance runtime. Alternatively, the user could create the entire abstract syntax tree from another language,
then compile the tree to a Csound performance runtime.
There is a new built-in multi-dimensional array type. Arrays can be passed to instruments and opcodes. Arithmetic
may be performed directly on arrays.
There is a new type system that enables user-defined types to be used in the Csound language.
The orchestra can be re-compiled at any time, or individual instruments can be compiled at any time, during a
running performance. This enables true "live coding" in Csound performances.
The Csound API has been rationalized and simplified.
Csound can take advantage of any number of CPUs for concurrent processing during performance. This occurs
without any changes to Csound code. This produces substantial speedups of most Csound processing. For
example, a piece that renders in 100 seconds with 1 core should render in about 50 seconds with 4 cores.
Csound can compile orchestras and scores directly from strings of text, enabling the use of Csound in
environments where writing to the file system is not permitted.
Score events such as notes can be scheduled to sample accurate times, even if synthesis is processed in blocks
of samples.
All opcodes that return a single value may be used as functions in the orchestra language.
Audio analysis file formats can be byte-order independent.
A single score statement can contain multiple string parameters.
Most oscillator opcodes will use an internal sine function table if the table number is omitted.
Command line options can be set programmatically using the Csound API.
Numerous duplicate areas of code within Csound have been rationalized.
An Android app was built which provides user-defined graphical user interfaces and JavaScript-based algorithmic
composition using HTML5.
The development of Csound 6 was led by John ffitch, Steven Yi and Victor Lazzarini.

Csound For Live Performance


Currently only Csound score or note events can be generated in real time (as opposed to instruments, which are only
definable at compile time, when csound first starts; in Csound 6 this limitation is removed). The set of sound
processors is defined and compiled at load time, but the individual processing objects can be spawned or destroyed in
real time, input audio processed in real time, and output generated also in real time. Note events can be triggered
based on OSC communications within an instrument instance, spawned by MIDI, or entered to stdin (by typing into a
terminal or sending textual statements from another program). The use of Csound 5 as a live performance tool can be
augmented with a variety of third-party software. Live Event Sheet within CsoundQt can be used to modify the score in
real-time. In addition, interfaces to other programming languages can be used to script Csound. A paper detailing the
use of Csound with Qt or Pure Data in real-time musical synthesis was presented at the 2012 Linux Audio Conference
[5] The Ounk project attempts to integrate Python with Csound while CsoundAC provides a way to do algorithmic
composition from Python using Csound as backend. Audivation's Csound for Live packages various opcodes into
Max/MSP wrappers suitable for use in Ableton Live.[6][7] Csound is also available for mobile systems (iOS,
Android).[8]

Front-ends: IDEs and music composition environments


MacCsound is an integrated Csound programming environment for Macintosh (no update since early 2011).
Csound Editor is an integrated programming environment for Csound [Windows].
WinXoundPro another IDE for Csound.
CsoundQt Another GUI front end for CSound [Windows/Mac/*NIX]. It is now included in the CSound distribution.
Dex Tracker Dex Tracker a tracker style front end for csound Including a grid editor and code generation tools,
and the ability to save your favorite sounds and rhythms as presets.
blue A music composition environment for Csound.
Bol Processor BP2 (http://bolprocessor.sourceforge.net/). A music composition environment for Csound and MIDI.
Automated CSound Orchestra Automated Csound orchestra building from individual instruments in csd format,
convert midi to CSound, and record to Csound in real time (windows program).
AlgoScore An algorithmic composition environment where one works in a graphical score, for Csound and MIDI.
Cecilia (in versions 1-4) a production frontend for Csound. (Cecilia 5 has migrated to pyo as backend.)
Cabbage production environment for Csound-based cross-platform audio plugins.
Lettuce a Windows frontend/editor for Csound5.
Csound-x for Emacs an Emacs frontend for Csound.
One laptop per child (OLPC)
Csound5 was chosen to be the audio/music development system for the OLPC project on the XO-1 Laptop platform.[9]

See also
Audio signal processing
Software synthesizer
Computer music
Comparison of audio synthesis environments
List of music software

References
1. Dr. Richard Boulanger - Three Decades with Csound: The Roots, Birth, and Early Years (http://csound.com/csoun
d30/papersessions.pdf)
2. Csound 6.12.0 | Csound Community (https://csound.com/site/news/2018/10/24/csound-6.12.0)
3. "Csound | SourceForge.net" (http://sourceforge.net/projects/csound/).
4. "Csound | GitHub.com" (https://github.com/csound/csound).
5. Joachim Heintz. "Csound as a Real-time Application" (http://lac.linuxaudio.org/2012/papers/10.pdf) (PDF).
Institute for New Music.
6. Peter Kirn (15 October 2011). "Csound For Live wiki" (http://createdigitalmusic.com/2011/10/csound-for-live-the-p
ower-of-csound-in-ableton-with-or-without-any-coding/). Create Digital Music.
7. Synthhead (15 October 2011). "Csound For Live Coming October 17th wiki" (http://www.synthtopia.com/content/2
011/10/15/csound-for-live-coming-october-17th/). Synthtopia.
8. S. Yi and V. Lazzarini. "Csound for Android" (http://lac.linuxaudio.org/2012/papers/20.pdf) (PDF).
9. "Csound on OLPC wiki" (http://wiki.laptop.org/go/Csound). Retrieved 23 November 2010.

Further reading
Richard Charles Boulanger, ed. (2000). The Csound Book: Perspectives in Software Synthesis, Sound Design,
Signal Processing, and Programming. MIT Press. ISBN 978-0-262-52261-8.
R. Bianchini and A Cipriani. (2000). Virtual Sound. Sound Synthesis and Signal Processing. Theory and Practice
with Csound. ConTempo s.a.s. ISBN 88-900261-1-1.
Richard Charles Boulanger and Victor Lazzarini, ed. (2011). The Audio Programming Book. MIT Press. ISBN 978-
0-262-01446-5. This is a book mostly about programming sound directly using the C language, but it does have a
couple of chapters about programming Csound opcodes.
Jim Aikin (2013). Csound Power! The Comprehensive Guide. Cengage Learning. ISBN 1-4354-6005-7.

External links
Official website (http://csound.com)

Retrieved from "https://en.wikipedia.org/w/index.php?title=Csound&oldid=893537693"

This page was last edited on 22 April 2019, at 02:18 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using
this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia
Foundation, Inc., a non-profit organization.

You might also like