Csound

Csound
Stable release 6.06[1] / November 17, 2015 (2015-11-17)
Development status Active
Written in C
Operating system Cross-platform
License LGPL
Website csound.github.io

Csound is a computer programming language for sound, also known as 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 some of its predecessors.

It is free software, available under the LGPL.

Csound was originally written at MIT by Barry Vercoe, based on his earlier system called Music 11, which in its turn followed the MUSIC-N model initiated by Max Mathews at the Bell Labs. Its development continued throughout the 1990s and 2000s, led by John ffitch at the 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 Istvan Varga, Gabriel Maldonado, Robin Whittle, Richard Karpen, Michael Gogins, Matt Ingalls, Steven Yi, Richard Boulanger, and Victor Lazzarini.

Developed over many years, it currently has nearly 1700 unit generators. 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.

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. This latest incarnation of the software is currently available in binary and source code for Linux, Microsoft Windows and Mac OS X from the SourceForge Csound project.[2] 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, DSSI, and VST plugins are all supported.

Real-time performance through MIDI has been added in the 1990s, a more recent addition is 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.[3] Csound 6 is also available for Android. The major new features of Csound 6 include:

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 [4] 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.[5][6] Csound is also available for mobile systems (iOS, Android).[7]

Front-ends: IDEs and music composition environments

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.[8]

See also

References

  1. SourceForge file page
  2. "Csound | SourceForge.net".
  3. "Csound | GitHub.com".
  4. Joachim Heintz. "Csound as a Real-time Application" (PDF). Institute for New Music.
  5. Peter Kirn (15 October 2011). "Csound For Live wiki". Create Digital Music.
  6. Synthhead (15 October 2011). "Csound For Live Coming October 17th wiki". Synthtopia.
  7. S. Yi and V. Lazzarini. "Csound for Android" (PDF).
  8. "Csound on OLPC wiki". Retrieved 23 November 2010.

Further reading

External links

Instrument collections and helpers

This article is issued from Wikipedia - version of the Monday, March 14, 2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.