Getting Started with Csound

What you need

Csound comes preinstalled in the XO and it is used internally by other activities like TamTam, so the XO comes ready to use all the material in this manual. This manual can be browsed online here, but it might be a good idea to download it as a content bundle here, because it will be accessible fast and offline from the Web Activity under the "Media" category in the initial page.


When Csound runs, it reads a Csound file and produces audio according to the instructions provided by that file. Csound can be run in different ways. It can be called from a terminal, or from a graphical front-end. A front-end is a graphical program that assists running Csound and can usually help edit csound files, like the Csound Editor Activity .

Using the Csound Editor Activity

[The Csound Editor Activity]

The Csound Editor Activity

The Csound Editor Activity provides an easy way of editing and playing Csound files.

  1. You can load and save Csound files using this panel. When you select load from this menu, you will find the directory containing the Csound Examples. There are several directories there that contain various example files. Valid files are the ones that end in .csd.

    You can also navigate to this manual's examples directory which is located (by default) in the directory /home/olpc/Library/csound5.08_manual_xo/examples.

  2. The time and transport bar shows the current time of the file playing and provides buttons for starting, pausing or stopping a performance. After you have loaded a Csound file, you will want to try the Play button (the one with the triangle).

  3. The upper text panel of the editor shows the orchestra section of the Csound file. This is where instruments and sound processes are defined.

  4. The lower text panel contains the score. The score lists a set of events which trigger the instruments defined in the orchestra section. This are the "notes" the intruments play.

  5. The buttons select what is displayed in the lower panel. The lower panel can show the Score section, the Csound console output (a report of the internal processes of Csound) and a MIDI keyboard for realtime generation of note events.

Using OLPCsound from the Terminal Activity

To use Csound from the command line, open the Terminal Activity. You can try the example files included with this manual line by moving to the examples directory of the manual like this:

cd /home/olpc/Library/csound5.08_manual_xo/examples

and then typing:

csound oscils.csd

This will make csound play the file "oscils.csd". You can see the long list of examples available by typing:




which lists all the contents in the current directory.

Editing and writing your own csd files

Csound reads text files which contain instructions for producing sound. These files usually have the extension ".csd" and are called csd files. They can be created and edited using simple text editors like Pippy or the Csound Editor Activity.

Csound's .csd files contain 3 main sections contained within <CsSynthesizer> and </CsSynthesizer> tags:

Note that anything after a semicolon (;) until the end of the line is a comment, and is ignored by Csound.

[Tip] Tip

When you use the Csound Editor Activity, you will not see the tags mentioned above, as it hides them for easier editing. You will only see two panels containing the Orchestra and Score sections of the csd file. In other words, if you are using the Csound Editor Activity, you don't need to worry about these tags and the structure of the file, as the activity will take care of that for you.

To use the csound examples in this manual, you can open them directly from the Csound Editor Activity, or you can copy (CTRL-C) and paste (CTRL-V) directly from the page. When you copy and paste, remember you must copy/paste the Orchestra (<CsInstruments>) and Score ()<CsScore>) sections separately. Remember to exclude the tags (e.g. <CsInstruments>) in the Csound Editor Activity.