CSOUND - FAQ


Subject: Csound FAQ 1.00
From: duprasm@ERE.UMontreal.CA (Martin Dupras
Archive-name: Csound-FAQLast-modified: 1995/01/11Version: 1.00

Here is version 1.00 of the Csound FAQ. Any comments, additions, criticisms, flames, etc. accepted. <

BR>

By the way, check out the ww Csound page at: http://coos.dartmouth.edu/~dupras/Csound/csoundpage.html

This document is posted to the Csound Mailing-list (see address below), as well as the usenet newsgroups comp.music, alt.emusic, and others of interest to composers, researchers and people dealing with software sound synthesis or processing in general. This document is by no means complete (yet!). It is posted as is, for now, for lack of another source of general info for Csound. You may get it via ftp at: ftp://hmc.edu/pub/csound/miscor access it on the Web at the Csound Page: http://coos.dartmouth.edu/~dupras/Csound/csoundpage.html.

Check out the mailing-list for announcements. Any contributions or corrections are welcome (please double check your submissions!). Specific questions (or if, for some reaons, you don't want to post to the mailing-list) may be sent to me.

Mail to:
dupras@dartmouth.edu
or duprasm@ere.umontreal.caand
please state in the subject: 'submission for Csound FAQ', or something similar.Thanx!
- Martin Dupras--------
[ new additions marked with * ]

1.0 What is Csound?

Csound is a software synthesis package in the tradition of so-called music-N languages, among which the best-known is Music V. It consists of an orchestra- and score-driven executable, written in C for portability. Since Csound is a computational language, it is highly flexible and efficient; complexity is gained only at the expense of computation time. Basically Csound reads some files and creates the result as a soundfile on disk or, on faster machines, realtime through a DAC.

1.1 How does Csound work?

Csound needs at least two files to read from: the score, which is a kind of event list for scheduling events, and an orchestra which defines *how* Csound will synthesize thoses events. An orchestra is composed of 'instruments', which are basically 'processes' triggered by the 'notes' (events) in the score.

1.2 How do I use Csound?

The manual is very descriptive on that point, so the answer here will just give a basic idea. On UNIX machines, you simply invoke the command 'csound' with the appropriate modifiers (see manual) and the filenames of the score and orchestra as arguments. On the mac version, you launch Csound, and you simply enter in the dialog box the filename of the files you want to use. (PC version, anyone?) When done, Csound will quit, after writing the last block of sound. You then have the great joy to listen to your masterpiece with whatever software you have that plays the chosen output file format.

1.3 What platforms does Csound run on?

- Unix: That's the "official" version, coming from MIT. You can get it at: ftp://cecelia.media.mit.edu /pub/Csound

- Mac: this version is available from MIT too: ftp:// cecelia.media.mit.edu/pub/Csound

- PC: it's called "PCsound". You can get it at: pc-csound:ftp://bath.ac.uk/pub/jpff

- Atari TT Falcon 030: This version of Csound is free, but you have to pay for the Soundfile operating system and utilities that go with it.

For more info, contact: Tom Endrich (tendrich@cix.compulink.co.uk)

1.3.1 Is there a native PowerPC version of Csound?

Yes! You'll find it at: ftp://notam.uio.no/pub/mac/audio/csound.PowerMac.sea.bin.
A readme file is in the same directory: CSOUND.Powermac.README.txt.
The port was made by erik@med.cornell.edu. (info kindly provided by Oyvind Hammer.) 2.0

Where can I get Csound?

You can get it via ftp from these sites:

- Unix version: ftp://cecelia.media.mit.edu/pub/Csound

- Mac versions: ftp://cecelia.media.mit.edu/pub/Csound
alternately, Ross Bencina recompiled a mac version that may run in thebackground.
It's found at: ftp://ftp.latrobe.edu.au/pub/music (info kindly provided by David Hirst.)

- PowerMac version: ftp://notam.uio.no/pub/mac/audio/csound.PowerMac.sea.bin.

- PC version: ftp://ftp.bath.ac.uk/pub/jpff

- Atari version (not free): mailto: Tom Endrich (tendrich@cix.compulink.co.uk) for info.
Other sites provide it as well. (addresses, anyone?)

2.1 Where can I get other stuff for Csound?

There is a growing number of utilities, changes to the source code, and additions for Csound, so it's hard to stay informed of everything. Probably the best place for finding interesting stuff is thru the mailing-list (described elsewhere in this FAQ.) Nevertheless, here are some programs or utilities worth checking out:

- CurveControl ftp://latrobe.edu.au/pub/music
"Stochastic granulator/score generator with breakpoint control for mac, by Ross Bencina"

- Ceres (for SGI): ftp://notam.uio.no/pub/sgi
"Ceres has a phase vocoder and a graphical user interface. It draws sonograms and supports a number of strange operations in the frequency domain. You will also find a function ("Sieve") which removes all but the strongest frequency components for each analysis frame, and a function which will write a Csound score file from the analysis data." (info provided by Oyvind Hammer)

- Adsyn (for SGI): ftp://notam.uio.no/pub/sgi
"Adsyn is a simple program for making or editing Csound adsyn/hetro breakpoint files." (info provided by Oyvind Hammer)

- SoundHack (for mac): ftp://mills.edu/pub/ccm/soundhack
This one does marvelous transformations on soundfiles using convolutions and phase vocoding. It also provides spectral dynamics processing and other useful processes.

3.0 How do I get more info on Csound?

Though information about Csound is pretty scarce, you can always find some useful tips from a couple of sources.

- First, there is a new mailing-list for Csound created by Martin Dupras (Universite de Montreal, Quebec) and James Andrews (University of Exeter, UK).
This mailing-list has been created especially for discussion on the use of Csound, and is open to all Csound whether veterans or beginners. You may join by sending a message to:
csound-request@maths.ex.ac.uk
the first line of which says subscribe name@host
and then post by sending mail to:

csound@maths.ex.ac.uk.

Please note that this list broadcasts to everyone on the list so *please* use netiquette:

1) read the FAQ! (you obviously did! Bravo!)

2) read the manual first! The manual is available with the Csound package, and you may always download a version (postscript or macintosh word) from cecelia.media.mit.edu, pub /pub/Csound.

>3) Try to be precise when asking questions, state your level of experience, and try to give complete descriptions of your particular problem, machine and Csound version. When posting csound material, be it scores/orchestras, C code, or whatever, please use text. This is the easiest way to have your stuff tried and used by people, whatever machine their particular machine or setup.

Document your code, especially when using unconventional or new unit generators or features available only on a particular machine.Try to have as descriptive a subject as possible: 'I have a question' or other similar generic subjects should be avoided. Try also to state in the subject if it is C code, orc/scos, questions, info, etc.

Newsgroups: some of interest may give you valuable insight on different computer music issues. Some worth of notice:

comp.music
comp.dsp
alt.music.makers.*


Mailing-list: lists of all known mailing-lists are posted regularly on the net.

3.1 Is there a WWW front page for Csound?

Yes! You can reach it at: http://www.leeds.ac.uk/music/Man/c_front.html (info kindly provided by James Andrews.)

* 4.0 How do I run Csound in realtime?

On machines fast enough, realtime output is achieved by usign-odevaudio. Instead of writing the sound to disk, Csound sends it'soutput towards the DACs. If you want realtime audio in, you may use the in[sq] opcodes inconjunction with the -idevaudio flag. Csound will then grab anything that goes through the computer's ADCs. The -Lstdin flag will take score events typed in realtime on your terminal and will process them as if read from a scorefile. If you need true realtime, you will have to play a little bit with the -b and -B flags, which are responsible for the size of the real-time audio buffers (the defaults induce a quite noticeable delay time). Limits vary depending on hardware, and the smaller the buffer, the more you risk drops...

*5.0 How do I use MIDI with Csound?

Using the various midi converters with the -F flag, you can use midifiles instead of scores to drive your orchestras. If you manage to get Csound running in real-time, you can use -Mdevname and use Midi instruments and controllers. Any combination of scores files, midi files, real-time midi and events typed at the terminal may be used at the same time. However, if some ofyour instruments contain krate midi converters, you must initialize them via midi, or they will crash. There exists also a MIDI-to-Csound application for Macintosh that generates a score from a midi-file. Nifty.

6.0 Any books about Csound or computer music in general?

As far as I know, the only documentation for Csound per se is the manual, either in postscript or MS Word format, available at the MIT server (see elsewhere in the FAQ for the ftp address). There's a rumour saying that Richard Boulanger is working on a book about Csound. There are a couple of nice books that may provide useful info:

any issue of the Computer Music Journal

> 'Elements Of Computer Music', by F. Richard Moore.Publisher: Prentice Hall.ISBN: 0-13-252552-6"
The 1st edition of this book had many errors. If there was an edition beyond the 1st, that is the one to get. Otherwise, you should get an errata list from the publisher (Prentice Hall, Englewood Cliffs, NewJersey, USA, 07632) or from the author (probably still at the University of California at San Diego)." (Tip by Ted Grusec).

'Computer Music. Synthesis, Composition, and Performance', by CharlesDodge and Thomas A. Jerse.Publisher: Schirmer Books. ISBN: 0-02-873100-X

'Foundations of Computer Music', ed. by C. Roads and J. Strawn.Publisher: MIT PressISBN: 0-262-181142 (hard) 0-267-68051-3 (paper)

'The Music Machine', ed. by C. Roads.Publisher: MIT Press ISBN: 0-262-18131-2

The Technology of Computer Music, by M. Mathews

Experimental Music, by Hiller & Isaacson

Cybernetic Music, by Jaxitron 7.0

Credits

I am indebted to many people for the information I gathered. In no particular order:
Alexandre "gregusse" Burton, Jean Piche, Bill Gardner, Dan Ellis, Barry Vercoe, Dennis Miller, Eli Brandt, James Andrews, Greg Sullivan.
Thanks a lot, pals!


- MD--
------------ Martin Dupras -------------
| http://coos.dartmouth.edu/~dupras/dupras.html |
| dupras@dartmouth.edu |
----------- duprasm@ere.umontreal.ca ----------