HOME

TheInfoList



OR:

Csound is a
domain-specific Domain specificity is a theoretical position in cognitive science (especially modern cognitive development) that argues that many aspects of cognition are supported by specialized, presumably evolutionarily specified, learning devices. The posit ...
computer programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming l ...
for audio programming. It is called Csound because it is written in C, as opposed to some of its predecessors. It is
free software Free software or libre software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, and distribute it and any adapted versions. Free software is a matter of liberty, no ...
, available under the LGPL-2.1-or-later. Csound was originally written at
MIT The Massachusetts Institute of Technology (MIT) is a private land-grant research university in Cambridge, Massachusetts. Established in 1861, MIT has played a key role in the development of modern technology and science, and is one of the m ...
by
Barry Vercoe Barry Lloyd Vercoe (born 1937) is a New Zealand-born computer scientist and composer. He is best known as the inventor of Csound, a music synthesis language with wide usage among computer music composers. SAOL, the underlying language for th ...
in 1985, based on his earlier system called Music 11, which in its turn followed the MUSIC-N model initiated by
Max Mathews Max Vernon Mathews (November 13, 1926 in Columbus, Nebraska, USA – April 21, 2011 in San Francisco, CA, USA) was a pioneer of computer music. Biography Mathews studied electrical engineering at the California Institute of Technology and the Ma ...
at the Bell Labs. Its development continued throughout the 1990s and 2000s, led by John Fitch 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, Iain McCurdy, Michael Gogins,
Matt Ingalls Matt Ingalls (born 1970) 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 comput ...
, Steven Yi,
Richard Boulanger Richard Charles Boulanger (born November 10, 1956) is a composer, author, and electronic musician. He is a key figure in the development of the audio programming language Csound, and is associated with computer music pioneers Max Mathews and Bar ...
,
Victor Lazzarini Victor Lazzarini (born 1969) is a Brazilian-Irish composer and computer music researcher. Born in Londrina, Brazil, he studied music in the local conservatory and completed his B.Mus. (Composition) at the State University of Campinas (UNICAMP). He ...
and Joachim Heintz. Developed over many years, it currently has nearly 1700
unit generator Unit generators (or ''ugens'') are the basic formal units in many MUSIC-N-style computer music programming languages. They are sometimes called opcodes (particularly in Csound), though this expression is not accurate in that these are not machine ...
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 is an ISO/IEC standard for describing sound. It was published as subpart 5 of MPEG-4 Part 3 (ISO/IEC 14496-3:1999) in 1999. It allows the transmission of synthetic music and sound effects at very low bit rates (from 0.01 t ...
extensions to MPEG-4, SAOL.


Csound code

Csound takes two specially formatted
text file A text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text. A text file exists stored as data within a computer file system. In operating ...
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 An audio file format is a file format for storing digital audio data on a computer system. The bit layout of the audio data (excluding metadata) is called the audio coding format and can be uncompressed, or compressed to reduce the file size, o ...
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 refers to a text-encoding system consisting of a set of symbols inserted in a text document to control its structure, formatting, or the relationship between its parts. Markup is often used to control the display of the document ...
tags (a CSD file with
filename extension A filename extension, file name extension or file extension is a suffix to the name of a computer file (e.g., .txt, .docx, .md). The extension indicates a characteristic of the file contents or its intended use. A filename extension is typically d ...
.csd). Here is a very simple example of a unified Csound data file which produces a
wave file Waveform Audio File Format (WAVE, or WAV due to its filename extension; pronounced "wave") is an audio file format standard, developed by IBM and Microsoft, for storing an audio bitstream on PCs. It is the main format used on Microsoft Wi ...
containing a one-second
sine wave A sine wave, sinusoidal wave, or just sinusoid is a curve, mathematical curve defined in terms of the ''sine'' trigonometric function, of which it is the graph of a function, graph. It is a type of continuous wave and also a Smoothness, smooth p ...
tone of 1
kHz The hertz (symbol: Hz) is the unit of frequency in the International System of Units (SI), equivalent to one event (or cycle) per second. The hertz is an SI derived unit whose expression in terms of SI base units is s−1, meaning that on ...
at a
sample rate In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples". A sample is a value of the signal at a point in time and/or sp ...
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 for editing, previewing, testing, and
debugging In computer programming and software development, debugging is the process of finding and resolving '' bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems. Debugging tactics can involve in ...
. 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 SourceForge is a web service that offers software consumers a centralized online location to control and manage open-source software projects and research business software. It provides source code repository hosting, bug tracking, mirrorin ...
Csound project. It is much improved and expanded compared to the original software, effectively made into a
software library In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subr ...
with an
API An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how ...
. A variety of front ends have been developed for it. In addition to the basic C API, there are also
Python Python may refer to: Snakes * Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia ** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia * Python (mythology), a mythical serpent Computing * Python (pro ...
,
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's List ...
,
Lisp A lisp is a speech impairment in which a person misarticulates sibilants (, , , , , , , ). These misarticulations often result in unclear speech. Types * A frontal lisp occurs when the tongue is placed anterior to the target. Interdental lisping ...
,
Tcl TCL or Tcl or TCLs may refer to: Business * TCL Technology, a Chinese consumer electronics and appliance company **TCL Electronics, a subsidiary of TCL Technology * Texas Collegiate League, a collegiate baseball league * Trade Centre Limited ...
and
C++ C++ (pronounced "C plus plus") is a high-level general-purpose programming language created by Danish computer scientist Bjarne Stroustrup as an extension of the C programming language, or "C with Classes". The language has expanded significan ...
among other bindings, like one from
Haskell Haskell () is a general-purpose, statically-typed, purely functional programming language with type inference and lazy evaluation. Designed for teaching, research and industrial applications, Haskell has pioneered a number of programming lan ...
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 LADSPA is an acronym for Linux Audio Developer's Simple Plugin API. It is an application programming interface (API) standard for handling audio filters and audio signal processing effects, licensed under LGPL-2.1-or-later. It was originally de ...
and DSSI are supported, but
VST VST may refer to: * Vancouver School of Theology, a theological graduate school in British Columbia, Canada * VST, Stockholm Västerås Airport in Sweden (IATA airport code) * Vehicle safety technology * Virtual Studio Technology, Steinberg's stand ...
support has been removed. Real-time performance through
MIDI MIDI (; Musical Instrument Digital Interface) is a technical standard that describes a communications protocol, digital interface, and electrical connectors that connect a wide variety of electronic musical instruments, computers, and re ...
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 GitHub, Inc. () is an Internet hosting service for software development and version control using Git. It provides the distributed version control of Git plus access control, bug tracking, software feature requests, task management, continuous ...
. Csound 6 is also available for Android. The major new features of Csound 6 include: * A
bison Bison are large bovines in the genus ''Bison'' (Greek: "wild ox" (bison)) within the tribe Bovini. Two extant and numerous extinct species are recognised. Of the two surviving species, the American bison, ''B. bison'', found only in North Ame ...
/
flex Flex or FLEX may refer to: Computing * Flex (language), developed by Alan Kay * FLEX (operating system), a single-tasking operating system for the Motorola 6800 * FlexOS, an operating system developed by Digital Research * FLEX (protocol), a comm ...
based parser for the Csound language is now standard. It generates an
abstract syntax tree In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of text (often source code) written in a formal language. Each node of the tree denotes a construct occurring ...
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 Victor Lazzarini (born 1969) is a Brazilian-Irish composer and computer music researcher. Born in Londrina, Brazil, he studied music in the local conservatory and completed his B.Mus. (Composition) at the State University of Campinas (UNICAMP). He ...
.


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 The Ounk project attempts to integrate Python with Csound while CsoundAC provides a way to do
algorithmic composition Algorithmic composition is the technique of using algorithms to create music. Algorithms (or, at the very least, formal sets of rules) have been used to compose music for centuries; the procedures used to plot voice-leading in Western counterpo ...
from Python using Csound as backend. Audivation's Csound for Live packages various opcodes into
Max/MSP Max, also known as Max/MSP/Jitter, is a visual programming language for music and multimedia developed and maintained by San Francisco-based software company Cycling '74. Over its more than thirty-year history, it has been used by composers, per ...
wrappers suitable for use in
Ableton Live Ableton Live is a digital audio workstation for macOS and Windows developed by the German company Ableton. In contrast to many other software sequencers, Ableton Live is designed to be an instrument for live performances as well as a tool ...
. Csound is also available for mobile systems (iOS, Android).


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 is a subfield of signal processing that is concerned with the electronic manipulation of audio signals. Audio signals are electronic representations of sound waves—longitudinal waves which travel through air, consisting ...
*
Software synthesizer A software synthesizer or softsynth is a computer program that generates digital audio, usually for music. Computer software that can create sounds or music is not new, but advances in processing speed now allow softsynths to accomplish the sam ...
*
Computer music Computer music is the application of computing technology in music composition, to help human composers create new music or to have computers independently create music, such as with algorithmic composition programs. It includes the theory and ...
*
Comparison of audio synthesis environments Software audio synthesis environments typically consist of an audio programming language (which may be graphical) and a user environment to design/run the language in. Although many of these environments are comparable in their abilities to prod ...
*
List of music software This is a list of software for creating, performing, learning, analyzing, researching, broadcasting and editing music. This article only includes software, not services. For streaming services such as iHeartRadio, Pandora, Prime Music, and Spotify, ...


References


Further reading

* * * 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. *


External links

* {{Authority control Audio programming languages Free audio software Electronic music software Software synthesizers