Managing Csound using Cecilia, free public-domain sound design software.
Publish date:
Social count:
Managing Csound using Cecilia, free public-domain sound design software.

FIG.1: Cecilia's highly graphical interface uses envelopes and sliders tocontrol the parameters of a Csound instrument. The Grapher window isthe program's main work area.FIG.2: Cecilia's Tools window provides a number of tools for entering andediting data.FEATURES4.5EASE OF USE4.0QUALITY OFSOUNDS5.0VALUE5.0RATING PRODUCTS FROM 1 TO5PROS: Unique parametercontrol for sounds. Highly graphical and colorful interface.Outstanding presets.CONS: Building Modulesrequires knowledge of Csound.Manufacturer
Burton and Piché
Web http://music.ucdavis.edu/re4m/ceciliaMinimum System RequirementsCecilia 2.04MAC:G3/600 MHz; 64MB RAM; Mac OS 9PC:Pentium II/800MHz; 64 MB RAM; Windows 98, 2000, ME, XPFIG.A: You can build your own Modules using Cecilia's Module editor. Inthis figure, each of the lines starting with "cgraph" will add auser-adjustable envelope to the Module's Grapherwindow.

Many desktop musicians are familiar with MIT's sound-programminglanguage, Csound. What they might not know is that it's no longernecessary to type code to work with the software. A number of newhelper applications have appeared that provide graphical interfaces forCsound, making the language much easier to work with (see “CsoundComes of Age” in the July 2002 EM). One application,Alexandre Burton and Jean Piché's Cecilia, has been available forMac and Linux for some time but was only recently ported to Windows byUC Davis faculty member Bill Beck. Like all things Csound, Cecilia isin the public domain and is free of charge.

Cecilia offers access to all of Csound's features but extends thelanguage in unique and exciting ways. It runs “on top” ofCsound — you can use Cecilia without any knowledge of what'shappening under the hood, though the more you know about Csound andsound synthesis, the more you'll get from the program.

I'll review Cecilia 2.04 running under Windows, but the feature setis nearly identical on the other platforms. First, just a few words ofintroduction about Csound itself.


Csound is a programming language for generating and processing soundthat has its roots at Bell Labs, where, in the late 1950s, many of themost significant developments in computer-generated sound firstoccurred. Like any programming language, Csound supplies a library offunctions with which the user builds the types of sound-generating and-processing algorithms desired. Most functions have one or moreparameters that the user must supply, and a complex design (whichCsound calls an Instrument) can require dozens of parameters. Though itwas originally developed as a non-real-time application, several newversions of Csound allow you to hear your sounds as they compile (seethe Csound home page at http://csounds.com for further details).

Image placeholder title

Cecilia's main job is to help you avoid the extensive typing that istypically required to work with Csound. Using its large and colorfulmain screen, called the Grapher (see Fig. 1), you enter valuesfor the various parameters of the included Csound Instruments bydrawing large sweeping arcs with your mouse or using the variousdata-input tools Cecilia provides.

Before you start making sound, you'll need to set up variouspreferences to optimize Cecilia for use on your computer. There arenumerous adjustable settings: you designate the version of Csound youwant Cecilia to call upon (a real-time version is included), choosefolders for the various types of files you'll use and create, andidentify external audio and MIDI programs to play those types ofdata.

Inside Cecilia, you can also tweak all of Csound's own settings; youcan, for example, adjust the buffer size for real-time playback, pickthe default sampling rate and output file type (WAV, AIFF, or RAW), andchoose how much memory to allocate to the program. With just a littleeffort, you can tweak Cecilia for optimal performance within nearly anycomputing environment.


If you're inclined to run through the presets when first checkingout a new piece of gear, you can start right in by testing Cecilia'sexisting Modules to see how they sound. Modules are text files thatcontain complete Csound Instrument designs along with additionalinformation that determines how the Modules look when first loaded (seethe sidebar “Module Building” for more details).

Included with Cecilia for Windows are several dozen Modules that aregrouped by category. Among these are spectral effects (equalizers andfilters), dynamics processors (distortion and compression/expansion),additive- and granular-synthesis processes, time-based routines (delaysand time compression/expansion), and a number of processing functionsthat defy categorization (including my favorite, Singin-in the-Fog).There are also Modules for performing LPC- and additive-basedanalysis/resynthesis and several that serve a variety of utilitypurposes.

To run a Module, load it from the New menu and specify the name ofan audio file for processing (if needed), then click on the Play buttonto hear the sound using the Module's default values. To record thesound, choose Disk as the output before pressing Play and supply a namefor the new file that will be created. “Playing” theModules feels very much like working with a soft synth or sampler, butthere is one major difference: you can't change parameter settingswhile a sound is playing back.


When you're ready to dig a bit deeper, maximize the Grapher window,and you'll find a very intuitive and efficient interface. The main areaof the screen contains envelopes (or “Graphs,” as they'retermed in Cecilia) and sliders that control the various parameters ofthe Csound Instrument being used by the current Module. Along the leftof the window are buttons that you use to switch among the parameters— click the Density button in the StochasticGrains Module shownin Fig. 1, for example, and the envelope for that parameter will behighlighted. Once highlighted, you can edit the envelope by adding ordeleting breakpoints or moving existing ones.

The number of breakpoints an envelope can have is unlimited, and youcan use both linear and nonlinear curves. Also, when you add a newbreakpoint or select an existing one, a small display appears showingyou the exact value for that point and its position in time. It's hardto enter specific values — even with the screen zoomed all theway in, the cursor still jumps to nonconsecutive values.

Working with the sliders is a bit easier; clicking on the blankspace on either side of a slider increments the value by its smallestamount. You can also change a slider's resolution by editing itsModule. Still, it would be useful to have a separate dialog boxavailable in which you could type an exact value for either a slider oran envelope.

Once you've created all the control data for the parameters of aModule, you can change the amount of time over which the sound willevolve by using the Duration slider at the bottom of the screen. Thatfeature, reminiscent of Xenakis's UPIC system and U&I Software'sMetaSynth, offers tremendous potential for creating a vast range ofsounds from a single Instrument design and cries out forexperimentation. You might, for example, create an evolving additive orFM sound, then recompile the sound after having scaled it to 25 timesits original length. See the EM Web site for an example of thisand other sounds created in Cecilia.

You'll be happiest using a large monitor or high screen resolution,because Cecilia's modular windows — the Grapher in particular— take up a lot of real estate.


Image placeholder title

One of the most extraordinary features of Cecilia is the toolkit itprovides for manipulating and generating control data. In the Toolswindow, you'll find buttons for importing and exporting Grapher data toor from a text file; cutting, copying, or pasting existing data to theClipboard; resetting the graph to its default value; and scalingexisting data (see Fig. 2). You can also copy the envelope ofone parameter onto another.

The five buttons found in the center column of the Tools window areperhaps the most useful and interesting, however, as they allow you togenerate entirely new data in unique ways. For example, the Sine toollets you quickly create sine curves to control a parameter, and likethe others, it provides precise control over the type of curve thatwill be generated. You can set the number of control points on thecurve (from 2 through 150 in increments of 1), as well as its frequency(0.01 to 20 in increments of 0.1 Hz), amplitude (values are normalizedbetween 0.01 and 1 and are adjustable in increments of 0.01), and phase(0 to 360 in 1-degree increments).

Among the other tools are a pulse- and ramp-waveform generatorcomplete with controls for frequency, amplitude, and pulse width; anoise generator, which offers control over the number of points and thenoise's overall amplitude; and a scatter tool that will sprinklebreakpoints all over the screen. The final tool is called Drunk, andthe name gives a pretty clear indication of the effect this toolhas.



Burton and Piché
Cecilia 2.04 (Mac/Win/Linux) sound-design software free

As mentioned above, Modules are at the heart of the Ceciliauniverse. The included Modules cover only a fraction of the vast rangeof functions Csound provides, so many more Modules are likely to appearat the Cecilia Web site (and, of course, you can create your own!).

I can't cover all of the Modules in detail but will focus on a fewof my favorites. For starters, the Brassage Module from the Timecategory produces striking granulated bursts of sound that build intodense, layered textures. The Module uses Csound's FOF2 opcode andrequires an audio file for processing. Parameters include GrainFrequency and Placement, Density, a pointer into the sample file beingprocessed, and Grain Attack and Decay times. The MP3 file

brassagelaugh uses an increasing density coupled with a descendingpitch-range curve.

Cuisi-warp mixes four versions of an audio input and gives youindependent control over each version's pitch level and sampleposition. By setting the Index parameter below zero, you can make anyof the four audio streams play backwards. The effect using a Gregorianchant sample as input is found in the MP3 file cuisiwarpchant.

The AdditiveSynth Module from the Synthesis category offers exactingcontrol over 16 harmonic partials. As expected, you can specify thefundamental frequency, then design complex, evolving envelopes for eachof the partials. You can also draw a waveform for the partials to use(why stick with a sine wave?) — just be sure to uncheck“sinus” at the bottom of the screen. By using the FreqShiftslider to move each partial up or down a small amount, you can easilycreate beating inharmonic sounds.

Also in the Synthesis category is StochasticGrains, a granular“synthesizer” that uses Csound's Foscil opcode to generatean FM sound source. The FM sound is

controlled by a host of parameters, each of which offers varyingdegrees of randomness.

The Compressor-Expander has a look slightly different from theothers — its controls (which include Slew Rate, CompressionRatio, and Gate Threshold, as well as both Input- and Output-GainAmounts) appear as a bank of sliders. And if you're a big Hendrix fan,try drawing your own nonlinear transfer functions in the DistortionModule and see if you can match The Master's sound.


Cecilia's documentation (HTML format only) is tightly linked withthe application and is comprehensive and well organized. You'll alsofind a number of tutorials online at the Windows Cecilia home page aswell as at the sites that support the versions running on otherplatforms.

Cecilia is a unique and fun program for working with sound. It iswell suited to experimentation and is guaranteed to produce resultsthat would be hard or even impossible to get in many of today'ssoftware synthesizers and samplers. It could also serve as a greatintroduction to some esoteric synthesis methods, granular inparticular, and if it inspires you to learn more about Csound itself,so much the better. At this price, it's an unbeatable deal.

Dennis Milleris an associate editor ofEM.


Building your own modules in Cecilia is fairly trivial, though someexperience with Csound is highly recommended. The Module in thisexample requires Csound version 4.02 or greater, which is included withCecilia for Windows. For the completed Phaser2 Module, which has a fewextra bells and whistles, go to http://music.ucdavis.edu/re4m/cecilia.

This example uses the Csound opcode phaser2, a classic phaser effectwith time-varying feedback and separation of the filter bands thatproduce the characteristic sweeping overtones. The Csound manual showsthis phaser2 syntax:

ar phaser2 asig, kfreq, iqual, iord, imode, ksep, kfeedback

Csound k-rate data is represented in Cecilia with graphs, i-ratedata with sliders. Looking at phaser2, you can see that it will havethree sliders and three graphs.

Image placeholder title

From Cecilia's File menu, choose New/Module, which brings upCecilia's Module editor (see Fig. A). The buttons along the topgive you access to text-editing windows for the code involved in Modulemaking; the blue boxes along the right are labels for each section.This example is in mono, so you'll need to remove code from the stereoorchestra that appears by default. Click on the Stereo button to revealthe code that begins “stereo template,” then Select All andCut. Move your cursor to the tk_interface area and add the following,which tells Cecilia to accommodate an input sound file:


Our first graph will be for the “kfreq” variable. Enterthe following on the next line in the tk_interface screen:

cgraph freq -label“Phase Freq” -unit cps -min 25
-max 15000 -rel log -func “0 600 .5 3000 1300”

Note that the arguments all begin with dashes. In order, they setthese parameters:

-label “PhaseFreq” gives the graph a label; -unit cps labels the units; -min25 and -max 15000 set the minimum and maximum values (in units of cps);-rel log specifies that the graph value be treated logarithmicallyrather than linearly; and -func “0 600 .5 3000 1 300”specifies that the initial graph be a function defined by threebreakpoints.

Less obvious is that the code “cgraph freq” tellsCecilia to create a global variable “gkfreq” that we willuse in instrument 1 to access the graph data. Gkfreq itself will bedefined behind the scenes in Cecilia's own instrument.

Next, add graphs for the other two k-rate variables, along with afourth for adjusting the wet/dry mix. These graphs will initialize withthe value specified by “-init”:

cgraph feedback -label“Feedback” -unit x -min -1 -max 1 -rel lin -init .9
cgraph sep -label “Harmonic\nSeparation” -unit x -min .1-max 9 -init 1 -rel lin
cgraph wet -label “Wet/Dry Mix” -unit x -min 0 -max 1-init .7 -rel lin

The sliders work in a similar manner. Enter the text below, whichwill create one slider for each i-rate variable in phaser2:

cslider ord -label“Filter Order” -min 1 -max 200 -res 1 -init 4
cslider qual -label “Quality” -min .01 -max 20 -init .5-res .25
cslider mode -label “Mode” -min 1 -max 2 -res 1 -init1

Note that this code uses a “-res” argument instead of“-rel”; “-res” controls the step size of theslider. With sliders, Cecilia will create global i-rate variables.Click on Mono to bring up the mono orchestra code. Add the followingcode between the “instr 1” and “out ar”lines:

asig soundin“[source]”
aphs phaser2 asig, gkfreq, giqual, giord, gimode, gksep,gkfeedback
amix = asig * (1-gkwet) + aphs* gkwet
ar balance amix, asig

Here, [source] refers to the interface code variable“source” that we created with the Cecilia“cfilein” command. Note that our i and k variables are nowglobal and ready to receive the data from Cecilia's interfaceinstrument.

Finally, click on the Score button to view the Csound score. Replacethe default code with the text “#minimum”, and Cecilia willsimply call our instrument for a duration equal to the input sound weprocess. From the File menu, choose “Save Module As” andfind your way to Cecilia's Files/Builtin folder. Name your module“Phaser2” or any name without spaces. The module is readyto go!