Csound

Last updated
Csound
Initial release1986;38 years ago (1986) [1]
Stable release
6.18.1 / November 24, 2022;14 months ago (2022-11-24) [2]
Repository
Written in C
Operating system Cross-platform
License LGPL-2.1-or-later
Website csound.com

Csound is a domain-specific computer programming language for audio programming. It is called Csound because it is written in C, as opposed to some of its predecessors.

Contents

It is free software, available under the LGPL-2.1-or-later.

Csound was originally written at MIT by Barry Vercoe in 1985, 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 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, Steven Yi, Richard Boulanger, Victor Lazzarini and Joachim Heintz.

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.instr1a1oscilp4,p5,1; Oscillator: p4 and p5 are the arguments from the score, 1 is the table number.outa1; Output.endin</CsInstruments><CsScore>f108192101; Table containing a sine wave. Built-in generator 10 produces a sum of sinusoids, here only one.i101200001000; 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:

The development of Csound 6 was led by John Fitch, 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]

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

Related Research Articles

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

Bytecode is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references that encode the result of compiler parsing and performing semantic analysis of things like type, scope, and nesting depths of program objects.

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 same tasks that previously required the dedicated hardware of a conventional synthesizer. Softsynths may be readily interfaced with other music software such as music sequencers typically in the context of a digital audio workstation. Softsynths are usually less expensive and can be more portable than dedicated hardware.

Granular synthesis is a sound synthesis method that operates on the microsound time scale.

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

In software engineering, the terms frontend and backend refer to the separation of concerns between the presentation layer (frontend), and the data access layer (backend) of a piece of software, or the physical infrastructure or hardware. In the client–server model, the client is usually considered the frontend and the server is usually considered the backend, even when some presentation work is actually done on the server itself.

Real-Time Cmix (RTcmix) is one of the MUSIC-N family of computer music programming languages. RTcmix is descended from the MIX program developed by Paul Lansky at Princeton University in 1978 to perform algorithmic composition using digital audio soundfiles on an IBM 3031 mainframe computer. After synthesis functions were added, the program was renamed Cmix in the 1980s. Real-time capability was added by Brad Garton and David Topper in the mid-1990s, with support for TCP socket connectivity, interactive control of the scheduler, and object-oriented embedding of the synthesis engine into fully featured applications.

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. It was one of the first programs for making music on a digital computer, and was certainly the first program to gain wide acceptance in the music research community as viable for that task. The world's first computer-controlled music was generated in Australia by programmer Geoff Hill on the CSIRAC computer which was designed and built by Trevor Pearcey and Maston Beard. However, CSIRAC produced sound by sending raw pulses to the speaker, it did not produce standard digital audio with PCM samples, like the MUSIC-series of programs.

<span class="mw-page-title-main">Max (software)</span> Visual programming language

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, performers, software designers, researchers, and artists to create recordings, performances, and installations.

<span class="mw-page-title-main">Pure Data</span> Visual programming language

Pure Data (Pd) is a visual programming language developed by Miller Puckette in the 1990s for creating interactive computer music and multimedia works. While Puckette is the main author of the program, Pd is an open-source project with a large developer base working on new extensions. It is released under BSD-3-Clause. It runs on Linux, MacOS, iOS, Android and Windows. Ports exist for FreeBSD and IRIX.

The Hierarchical Music Specification Language (HMSL) is a music programming language written in the 1980s by Larry Polansky, Phil Burk, and David Rosenboom at Mills College. Written on top of Forth, it allowed for the creation of real-time interactive music performance systems, algorithmic composition software, and any other kind of program that requires a high degree of musical informatics. It was distributed by Frog Peak Music, and runs with a very light memory footprint on Macintosh and Amiga systems.

The Apple Developer Tools are a suite of software tools from Apple to aid in making software dynamic titles for the macOS and iOS platforms. The developer tools were formerly included on macOS install media, but are now exclusively distributed over the Internet. As of macOS 10.12, Xcode is available as a free download from the Mac App Store.

Dalvik is a discontinued process virtual machine (VM) in the Android operating system that executes applications written for Android. Dalvik was an integral part of the Android software stack in the Android versions 4.4 "KitKat" and earlier, which were commonly used on mobile devices such as mobile phones and tablet computers, and more in some devices such as smart TVs and wearables. Dalvik is open-source software, originally written by Dan Bornstein, who named it after the fishing village of Dalvík in Eyjafjörður, Iceland.

<span class="mw-page-title-main">Impromptu (programming environment)</span>

Impromptu is a Mac OS X programming environment for live coding. Impromptu is built around the Scheme language, which is a member of the Lisp family of languages. The source code of its core has been opened as the Extempore project.

Richard Charles Boulanger 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 Barry Vercoe.

<span class="mw-page-title-main">WebAssembly</span> Cross-platform assembly language and bytecode designed for execution in web browsers

WebAssembly defines a portable binary-code format and a corresponding text format for executable programs as well as software interfaces for facilitating interactions between such programs and their host environment.

EarSketch is a free educational programming environment. Its core purpose is to teach coding in two widely used languages, Python and JavaScript, through music composing and remixing. This learning environment was developed first at Georgia Institute of Technology, under Prof. Jason Freeman and Prof. Brian Magerko.

References

  1. Dr. Richard Boulanger - Three Decades with Csound: The Roots, Birth, and Early Years
  2. "Releases · csound/csound". github.com. Retrieved 2023-02-11.
  3. "Csound | SourceForge.net".
  4. "Csound | GitHub.com".
  5. Joachim Heintz. "Csound as a Real-time Application" (PDF). Institute for New Music.
  6. Peter Kirn (15 October 2011). "Csound For Live wiki". Create Digital Music.
  7. Synthhead (15 October 2011). "Csound For Live Coming October 17th wiki". Synthtopia.
  8. S. Yi and V. Lazzarini. "Csound for Android" (PDF).
  9. "Csound on OLPC wiki" . Retrieved 23 November 2010.

Further reading