electronicmusic.com

Studio Help
All About CSound

The CSound program has its origins in the Music programs (Music1, Music2, Music3, and Music4) written by Max Matthews in the 1960's. It was in these programs and their derivatives that the routines used in CSound were first developed. Music4 was expanded into a new program called Music4B by Godfrey Winham (Princeton) and Hubert Howe during 1964 and 1965.

Up until this time music programs were designed to run on a particular family or model of computer. These computers were then made obsolete by the appearance of new models. Music4 and Music4B could not easily be adapted to the new computers. In order not to be upset by any subsequent generation of computers Music4B was translated entirely into Fortran, a transportable computer language compatible with many computer systems. The new program, Music4BF was written by Howe and then altered and expanded by Howe and Winham.

At the same time as this Barry Vercoe developed a similar, although machine dependent, program. This was Music360 for the IBM System/360. The first music program of this type that was designed for a mini computer was also developed by Vercoe, this was Music11 which ran on a (DEC) PDP-11.

Music 11 was the immediate forerunner of CSound, and these features have been carried through to the current program. With CSound there is increased flexibility as it will run on any computer with a C language compiler, this makes it possible to use it with the MacIntosh.

The sharing nature of computer music research has continued through the development of CSound, the current release combines the efforts of several composers active in computer music. The work of Richard Boulanger at the Berklee College of Music, Boston, and Barry Vercoe's graduate students at MIT, Bill Gardiner and Dan Ellis is particularly acknowledged.

The Synthesis Process
An important characteristic of Music4, Music360, and Music11 is the use of a synthesis organisation in which the composer uses a group of computer simulated sound objects, or 'instruments'. This group has traditionally been referred to as the 'orchestra'. This orchestra is controlled by a 'score'. The orchestra is defined in a computer language which uses modules with specific functions. These modules can be arranged in virtually limitless combinations to become instruments which can perform complex operations. The sounds of these instruments can then be controlled by parameters in the score, or by other parts of the instrument.

Description of a Typical CSound Orchestra
A typical CSound orchestra consists of a collection of instruments. Each instrument is a collection of predefined modules the parameters of which are controlled in the score. There is a protocol by which orchestras and instruments are defined. An orchestra is really a word processor document which can be written in any word processor application which can save files as text only, such as Teach Text or Microsoft Word. The orchestra document consists of a header statement, which defines the format of the output, and an instrument list.

The header statement defines important qualities of the instrument. The first two qualities are sr and kr, these define the rates that the variables used in the instrument are updated. There are two distinct types of variables, audio rate (a rate) and control rate (k rate). The frequency at which these variables are updated are, respectively, sr and kr. Sr also defines the sample rate of the output sound. 44100 is a convenient rate to use as this is the inter-nationally recognised standard for Compact Disc sample rate.

The format for writing an instrument is as follows:

sr = 44100

kr = 882

ksmps = 50 ;This expresses the ratio sr / kr.

nchnls = 2 ;This gives the number of output channels.

Instr 1

...........................................(This space is used to define the instrument)

endin

Instr 2

........................................................................................................................

endin

etc...

Instruments are defined between a title, which is an instrument number, and a closing statement (see above). The instrument is built from a succession of statements which define which modules will be used and how they will interact together. Instrument definition is one of the most creative aspects of the program, as this not only sets the possibilities and limits of sound generation in which musical timbre is designed, but also determines how the score will be laid out, and how the score will manipulate the instrument.

Description of a Typical C Sound Score
The score also has its own protocols. Again like the orchestra it is a word processor document. It may begin with a definition of a set of function tables which may be used to generate waveforms to be used in synthesis. Thereafter it becomes a list of commands for the instruments in the orchestra. These are presented by an initial "ix" statement, where x is any integer with a corresponding instrument number in the orchestra. The ix statement is followed by a start time and duration. The functions of the parameters which follow are determined within the individual instruments of the orchestra. The score is really a succession of numbers separated by blank spaces, eg.

f1 0 4096 10 1

i1 0 5 ... ... ... ... ... ... ...

e

The example shows two types of statements available in the score. The first is a function table for generating sine waves, and the second is an instruction to an instrument, inst 1. It instructs instrument 1 to produce a note 5 seconds long at time 0. A simple CSound instrument will require these three parameters as a minimum, while more complex instruments can use up to 150 parameters.

The Canonic Csound version 3.46 as compiled by John F. Fitch is available for download from servers at:

The 3.46 html Csound Manual prepared by Jean Piché which accompanies the public Csound version 3.46 can be read on servers at:

Download version 2 of HTML MIT Csound Manual(c.160k) from Leeds University, England for use on your own machine by going here

Atsushi Tadokoro of Keio University, Fujisawa has mounted a Japanese Csound Manual here

The Csound FAQ are maintained by Martin Dupras (Martin.Dupras@Dartmouth.EDU) who also provides a plain text version here

Courtesy of Leeds University Department of Music, author PJN.

Go here to get back to the Studio Help subject index.

electronicmusic.com/features/siu/studiohelp/about/csound.html


Hardware | Software | Music | Games | Events
Features: Interviews | Print | Showcase | Scene | Start it Up | Studio Help | People | Recordings | Manufacturers | Newsgroups | Mailing Lists | Glossary
Site: Contact |
©1995-2002 electronicmusic.com