Csound
Encyclopedia
Csound is a computer programming language for dealing with sound, also known as a sound compiler or an audio programming language
Audio programming language
An audio programming language is a programming language specifically optimized for sound and music production or sound synthesis. Some of the languages below are optimized more for music composition, and some are optimized more for synthesis...

, or more precisely, a C-based audio DSL. It is called Csound because it is written in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

, as opposed to some of its predecessors. Csound was originally written at MIT
Massachusetts Institute of Technology
The Massachusetts Institute of Technology is a private research university located in Cambridge, Massachusetts. MIT has five schools and one college, containing a total of 32 academic departments, with a strong emphasis on scientific and technological education and research.Founded in 1861 in...

 by Barry Vercoe
Barry Vercoe
Barry Vercoe is a New Zealand-born computer scientist and composer. He completed his undergraduate degree in New Zealand in Music and Mathematics and went on to complete a Ph.D. at the University of Michigan, USA, in Music Composition. In 1968, Vercoe's research in Digital Audio Processing paved...

, based on his earlier system called Music 11, which in its turn followed the MUSIC-N
MUSIC-N
MUSIC-N refers to a family of computer music programs and programming languages descended from or influenced by MUSIC, a program written by Max Mathews in 1957 at Bell Labs. MUSIC was the first computer program for generating digital audio waveforms through direct synthesis...

 model initiated by Max Mathews
Max Mathews
Max Vernon Mathews was a pioneer in the world of computer music.-Biography:...

 at the Bell Labs. It is free software
Free software
Free software, software libre or libre software is software that can be used, studied, and modified without restriction, and which can be copied and redistributed in modified or unmodified form either without restriction, or with restrictions that only ensure that further recipients can also do...

, available under the LGPL. 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 (who developed a variant of the system, CsoundAV, which includes image and graphics processing extras), Robin Whittle, Richard Karpen, Michael Gogins, Matt Ingalls
Matt Ingalls
Matt Ingalls is an American composer, clarinetist, concert producer, and computer music programmer. He is mostly associated with the San Francisco Bay Area Improv Scene, sfSound, the San Francisco Tape Music Festival, and the computer music program Csound.-Performance:Ingalls is most active as a...

, Steven Yi, Richard Boulanger, and Victor Lazzarini
Victor Lazzarini
Victor Lazzarini, born in Londrina, Brazil in 1969, is a composer and computer music researcher living in Ireland. After studying music in the local conservatory, Victor went on to study for his B.Mus. at the State University of Campinas , where he graduated in 1993...

.

Developed over many years, it currently has over 1200 unit generator
Unit generator
Unit generators are the basic formal units in many MUSIC-N-style computer music programming languages. They are sometimes called opcodes , though this expression is not accurate in that these are not machine-level instructions.Unit generators form the building blocks for designing synthesis and...

s. 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
MPEG-4 Structured Audio
MPEG-4 Structured Audio is an ISO/IEC standard for describing sound. It was published as subpart 5 of MPEG-4 Part 3 in 1999....

 extensions to MPEG-4
MPEG-4
MPEG-4 is a method of defining compression of audio and visual digital data. It was introduced in late 1998 and designated a standard for a group of audio and video coding formats and related technology agreed upon by the ISO/IEC Moving Picture Experts Group under the formal standard ISO/IEC...

, SAOL
Structured Audio Orchestra Language
Structured Audio Orchestra Language is an imperative, MUSIC-N programming language designed for describing virtual instruments, processing digital audio, and applying sound effects...

.

Csound code

Csound takes two specially formatted text file
Text file
A text file is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists within a computer file system...

s 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
Markup language
A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. The idea and terminology evolved from the "marking up" of manuscripts, i.e. the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts...

 tags (a CSD file with filename extension
Filename extension
A filename extension is a suffix to the name of a computer file applied to indicate the encoding of its contents or usage....

 .csd). Here is a very simple example of a unified Csound data file which produces a wave file containing a one second sine wave
Sine wave
The sine wave or sinusoid is a mathematical function that describes a smooth repetitive oscillation. It occurs often in pure mathematics, as well as physics, signal processing, electrical engineering and many other fields...

 tone of 1 kHz at a sample rate of 96 kHz:


;


csound -W -d -o tone.wav



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



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





As with many other programming languages, writing long programs in Csound can be eased by using an integrated environment
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 for editing, previewing, testing, and debugging
Debugging
Debugging is a methodical process of finding and reducing the number of bugs, or defects, in a computer program or a piece of electronic hardware, thus making it behave as expected. Debugging tends to be harder when various subsystems are tightly coupled, as changes in one may cause bugs to emerge...

. The one now officially supported is QuteCsound, 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
SourceForge
SourceForge Enterprise Edition is a collaborative revision control and software development management system. It provides a front-end to a range of software development lifecycle services and integrates with a number of free software / open source software applications .While originally itself...

 Csound project.http://csound.sf.net 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
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 API, there are also Python
Python (programming language)
Python is a general-purpose, high-level programming language whose design philosophy emphasizes code readability. Python claims to "[combine] remarkable power with very clear syntax", and its standard library is large and comprehensive...

, Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

, Lisp, Tcl
Tcl
Tcl is a scripting language created by John Ousterhout. Originally "born out of frustration", according to the author, with programmers devising their own languages intended to be embedded into applications, Tcl gained acceptance on its own...

 and C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 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 For Live

The use of Csound 5 as a live performance tool was enhanced as of October 18th, 2011, whereupon Audivation announced Csound For Live,. Whilst maintaining the open source nature of Csound, Audivation packaged various opcodes in Max/MSP
Max (software)
Max is a visual programming language for music and multimedia developed and maintained by San Francisco-based software company Cycling '74. During its 20-year history, it has been widely used by composers, performers, software designers, researchers, and artists for creating innovative recordings,...

 wrappers suitable for use in Ableton Live
Ableton Live
Ableton Live is a loop-based software music sequencer and DAW for Mac OS and Windows by Ableton. The latest major release of Live, Version 8, was released in April 2009. In contrast to many other software sequencers, Live is designed to be an instrument for live performances as well as a tool for...

, thus integrating realtime performance of multiple Csound patches from within a DAW.

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.

See also

  • Audio signal processing
    Audio signal processing
    Audio signal processing, sometimes referred to as audio processing, is the intentional alteration of auditory signals, or sound. As audio signals may be electronically represented in either digital or analog format, signal processing may occur in either domain...

  • Software synthesizer
    Software synthesizer
    A software synthesizer, also known as a softsynth is a computer program or plug-in for digital audio generation. Computer software which can create sounds or music is not new, but advances in processing speed are allowing softsynths to accomplish the same tasks that previously required dedicated...

  • Computer music
    Computer music
    Computer music is a term that was originally used within academia to describe a field of study relating to the applications of computing technology in music composition; particularly that stemming from the Western art music tradition...

  • Comparison of audio synthesis environments
    Comparison of audio synthesis environments
    Software audio synthesis environments typically consist of an audio programming language and a user environment to design/run the language in. Although many of these environments are comparable in their abilities to produce high-quality audio, their differences and specialties are what draw users...


External links

contains FAQs, manuals, programming examples, other front end programs, and misc other goodies. The mailing list archive is also a good place to find detailed information.
  • Project site at SourceForge
    SourceForge
    SourceForge Enterprise Edition is a collaborative revision control and software development management system. It provides a front-end to a range of software development lifecycle services and integrates with a number of free software / open source software applications .While originally itself...

  • The Csound Manual
  • csound - collaboratively developed manual on FLOSS Manuals
    Floss manuals
    The FLOSS Manuals is a non-profit foundation founded in 2006 and based in the Netherlands. The foundation is focused on the creation of quality documentation about how to use free software....

  • MacCsound is an integrated Csound programming environment for Macintosh.
  • Csound for MacOS Classic
  • Csound Editor is an integrated programming environment for Csound [Windows].
  • WinXoundPro another IDE for Csound.
  • QuteCSound Another GUI front end for CSound [Windows/Mac/*NIX]
  • 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 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.
  • Csound-OLPC The Csound page in the OLPC wiki, with extra tutorials and XO-specific information and Dr.B's TOOTs
  • The Csound Book edited by R Boulanger and the 3500+-instrument Csound Catalog
  • Virtual Sound a Csound book for beginners, by R Bianchini and A Cipriani
  • Cecilia a production frontend for Csound.
  • Lettuce a Windows frontend/editor for Csound5.
  • Csound-x for Emacs an Emacs
    Emacs
    Emacs is a class of text editors, usually characterized by their extensibility. GNU Emacs has over 1,000 commands. It also allows the user to combine these commands into macros to automate work.Development began in the mid-1970s and continues actively...

    frontend for Csound.
  • Csound Helpers A list of links to Csound helper applications, mostly for Linux.
  • Csound For Live is a collection of Csound based instruments and DSP plugins for Ableton Live.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK