Use Non-Frames Version Previous Page Next Page

How to Install Csound


Detailed instructions for installing and configuring Csound on Macintosh systems may be obtained from:

Windows 95/98

Detailed instructions for installing and configuring Csound on Windows 95 or Windows 98 systems may be obtained from:

MS-DOS and Windows 3.x

Detailed instructions for installing and configuring Csound on MS-DOS or Windows 3.x systems may be obtained from:

Linux (Developers' Version)

Introduction to the Developers Linux Version

Building Csound for UNIX and Linux machines has been possible thanks to John Fitch's Csound.tar.gz source file kept at:

This source tree builds Csound on a variety of UNIX-type systems, including the NeXT, Sun's Solaris, SGI machines, and Intel-based Linux. It should be noted that John also maintains a Linux binary at the Bath repository. That version is built from his canonical sources.

In 1998 a group of developers prepared a new version of Csound for Linux. This version (often referred to as the "developers' version" or "unofficial distribution") aims to deliver a modern package for Linux users. It offers a variety of amenities specific to Linux systems, including these items:

This distribution's code base originates with the sources provided by John Fitch at the Bath site. Every effort is made to ensure compatibility with those sources at the opcode level, and users should have no trouble running most orc/sco files or .csd files made for Csound on other operating systems.

The makefile structure has been provided by Nicola Bernardini. He also maintains the CVS repository. Other features have been added by developers Ed Hall (Alpha port), Fred Floberg (scheduler), Robin Whittle, and Steve Kersten (full-duplex under OSS driver). RPM and DEB packages are sporadically available from Damien Miller and Guenter Geiger.

Building the developers' version is quite simple, using the familiar "./configure; make depend; make; make install" command sequence. Instructions for compiling and installing Csound are provided with the package, along with other relevant documentation. A mail-list has been established for developers and users of this package, and a bug-tracking system has been set up by Damien Miller.

Preparing Linux Audio for Csound

As long as the basic Linux audio system is properly configured and installed, no special efforts need to be made in order to enjoy audio output from Csound. The default realtime audio output device (devaudio) is defined as /dev/dsp in Csound itself, although other audio devices (/dev/audio, /dev/dspW) can be specified if so desired.

Using the Developers Version

This version is designed to be opcode-compatible with any other version of Csound. However, some new options have been added which may require clarification.

Realtime audio output can be as simple as this:

   csound -o devaudio -V 75 my.orc my.sco

The '-V' flag is a Linux-specific output volume control from Jonathan Mohr. Note that it will work only with the OSS/Free and OSS/Linux drivers.

Here we get a little more complicated:

   csound --sched --ossin=/dev/dsp0 --ossout=/dev/dsp1 my.*

This example invokes Fred Floberg's high-priority scheduler (which will automatically disable graphics output) and Steve Kersten's support for full-duplex using either the OSS/Free driver included with the Linux kernel or the commercially available OSS/Linux driver. Linux users can use the asterisk as a wildcard for the orc/sco extensions. However, if you have my.orc, my.sco, and my.txt within the same directory the compiler will get confused and the wildcard won't work.

If more than one soundcard is present in the system, ALSA users have the option of choosing which card will function for either audio input or output. The command sequence then appears so:

   csound --incard=1 --outcard=2 my.orc your.sco

The standard advice regarding audio buffer settings holds true for Linux as well as for any other version. If the audio output is choppy you may need to adjust the value for the '-b' flag which controls the sample frame size for the software audio buffer. The best setting will depend upon various aspects of your machine system, including CPU speed, memory limits, hard-disk performance, etc.

Supported options for MIDI include the '-Q' (MIDI output device) and '-K' (MIDI input port) flags from Gabriel Maldonado's DirectCsound. Here is an example which uses one of Gabriel's opcodes, requiring the use of a MIDI output port:

   csound -Q0 -n my_moscil.orc my_moscil.sco

The '-Q0' flag selects the first available MIDI output device, '-n' cancels writing the output to disk.

It should be noted that, for Linux at least, in the opcode for this instrument (moscil) the sample rate determines the tempo of events. Setting the control rate (kr) to equal the sample rate (sr), "unofficial distribution" a higher sample rate will result in a slower performance. When sr=390000 (yes, you read that correctly, it's a sample rate of three hundred and ninety thousand) then the MIDI event performance output is approximately 60 BPM (beats per minute). At that sample rate a score tempo statement of 't 0 60' will actually mean 60 bpm. In essence, the sample rate acts as a restraint or throttle on the tempo of the MIDI event stream.

Using MIDI for realtime input is simple:

   csound --sched -o devaudio -M/dev/midi my_midi_in.*

With correctly written orc/sco files this example will allow realtime control of Csound via whatever controlling device is hooked up to /dev/midi. If more than one MIDI device is present in the machine the user can specify which to use:

   csound --sched -o devaudio -M/dev/midi01 my_midi_in.*

That sequence will select the second MIDI device for MIDI input.

Here we use a Type 0 standard MIDI file for the controlling input:

   csound --sched -o devaudio -T -F/home/midfiles/my_type_0.mid my_cool.orc my_cool.sco

In these last two examples the score file provides only the necessary function tables and a place-holder to indicate how long Csound should stay active:

  f1 0 8192 10 1	; a sine wave 

  f0 240	      ; stay active for 240 seconds 


However, the '-T' flag will halt performance as soon as the end of the MIDI file is reached.


The Linux developers version of Csound is available in source and binary distributions. The main distribution sites are at AIMI in Italy:

and the ftp server for the Music Technology Department at Bowling Green State University in the USA:

Developer Maurizio Umberto Puxeddu has also established a distribution point, though at this time it is version-specific and not browsable. For more information regarding his site, and for more information generally regarding Linux Csound, see this Web page:


First thanks go to Barry Vercoe for creating Csound and allowing it to be freely and publicly distributed and to John Fitch for maintaining the canonical source packages (including his own build for Linux).

Special thanks go to the following persons for their development assistance and/or spiritual guidance:

My apologies to anyone I've left out. Please send corrections and emendations of this document to me at my email address below.

Dave Phillips
September 1999

Other Platforms

For information on availability of Csound for other platforms, see The Csound FrontPage:

Use Non-Frames Version Previous Page Next Page