Friday, February 16, 2007

Tested and approved: Csound is awesome

Adam Boulanger gave Aurelius Prochazka and I a three hours introductory tutorial on csound.

Csound is a programming language -originally witten in C, ref. its name- by Barry Vercoe at MIT Media Lab. Synthesized sounds that come out of csound are elegant and allow anyone with a computer to freely compose sounds. I prefer it to reason for its infinite personal potentials.

Composer Richard Boulanger edited the famous Csound book. BT on the other end revisited csound taught by Dr Boulanger for his Binary Universe album.

Saying that, all I can say is tested and approved and I can share some of the notes I took, as I think it can help anyone start with the Csound software and compose music.

  • Install the csound environment from sourceforge to install the CsoundLib framework.
  • If you have a mac, install Mac sound -for some reason Csound 5 did not work on my intel mac-
  • Open Mac Csound. Save the file that automatically opened.
  • Any name written in "blue" are called opcode, they are functions and clic " apple + ' " to have the help file of any of these opcode. The help file gives you the usual syntax and examples for each opcode.
  • A specific rate is defined with k, and a. The rest of the label can be anything descriptive, but the letter 'k' and 'a' will be understood by the system as the rate you want.
  • you can test out the following. Add to the orchestra window (orc)
    sr = 44100
    kr = 4410
    ksmps = 10
    nchnls = 1
    instr 1
    kamp = 10000
    kcps = 220
    ifn = 1
    a1 oscil kamp, kcps, ifn
    out a1
  • add to the score window (sco)
    ; Table #1, a sine wave table with a small amount of data.
    f 1 0 4096 10 1

    ; Play Instrument #1, the basic oscillator, for
    ; two seconds. This should sound relatively rough.
    i 1 0 2


  • If you press the icon, your piece will play back.

  • in the score window (sro) you wrote: "f 1 0 4096 10 1 "
    10 is the gene routine number. 4096, a power of two. it drastically changes the sound if 4096 becomes 8!
    In file:///Library/Frameworks/CsoundLib.framework/Versions/5.1/Resources/Manual/ScoreGenRef.html
    the gene routines are explained.

  • In the (sro) window you also wrote: "i 1 0 2"
    i: means instrument
    1: refered to the instrument 1 from the orchestra window
    0: start
    2: duration in seconds
    3: frequency

    (then you can add different instruments, that overlap in time or start at different times etc...)

  • Adam mentioned the indispensable opcodes to try out:
    . foscil (A basic frequency modulated oscillator.)
    . grain (Generates granular synthesis textures)
    . grain2 (Easy-to-use granular synthesis texture generator.)
    . soundin (Reads audio data from an external device or stream)
    . physical modeling instrument: pluck (Produces a naturally decaying plucked string or drum sound.)

  • Finally a good key ressource is the first chapter of the Csound book by Dr. Richard Boulanger, Introduction to Sound Design in Csound. It can be downloaded for free from MIT Press. Also the Csound web site community

    Good luck!

  • 1 comment:

    Anonymous said...

    I Personally prefer reaktor (from native instruments). It of course implies a different gui metaphor (namely that of a modular synth, somewhat similar to Max/MSP etc), or if you can live with a computer/hardware hybrid system Clavia's Nord Modular.
    But both of these are commercial (like reason...)