Beginners Synthesis Processing Real-Time AXCsound Composing Ecological Modeling Links Editorial Contribute Back Issues
Damián Keller
School for the Contemporary Arts
Simon Fraser University
June 1999
Examples: | 1 | 2 | 3 | 4 | 5 | 6 |
CMask is a score generator for the audio synthesis language Csound (Vercoe, 1993). This helper application features several functions to produce stochastic events in Csound (Bartetzki, 1997). This short tutorial presents some simple examples and provides the basic features of more elaborate scores used in ecologically-based pieces. Other examples can be found in touch¹n¹go (Keller, 1999).
This tutorial does not cover the basics of CMask or Csound because manuals for both applications are widely available (cf. links). As far as possible, we will provide links to definitions and pointers to web documentation. Before getting into the subject we have to warn the user of some limitations in CMask:
To overcome these limitations we have resorted to other software to generate the Csound scores: AC Toolbox (Berg, 1998), Alcaucil (Keller, 1998). Nevertheless, CMask has proven to be useful for synthesizing several sound classes. The working method that we present in this tutorial covers a few classes of ecologically-modeled sounds, and provides some basic examples of the ecological approach to sound resynthesis. No attempt is made to cover theoretical and conceptual issues which are already discussed in other sources (cf. Keller & Truax, 1998; Keller & Rolfe, 1998; Keller, 1999b).
Throughout this tutorial, we use the word event to define a sound produced by the combination of multiple grains (in the order of hundreds to thousands). The grains are previously sampled and edited sounds which keep their original spectral and temporal qualities (Keller & Truax, 1998). Thus, a single event is generated by this procedure:
We have tried to keep some consistency by following Csound syntax conventions in the score formatting process. Resolution is always kept at 5 decimal places for floating point variables, and at integer for integer variables (usually used for ftable numbers). In CMask syntax it is indicated thus:
prec 5 ; 5 decimal places (0.00000). |
Most parameter values are normalized (0 to 1 range) and scaled in the Csound instrument. We keep the sound file¹s original amplitude and select the scaling option in Csound to avoid clipping.
Each CMask parameter stands for a pfield in Csound. p1 to p3 are mandatory to get any output from CMask. To simplify notation, we have not included these parameters in the examples. So the user should add them when trying out the examples. All our Csound instruments read each line score by this convention (p stands for pfield or parameter field):
(mono) |
(stereo) |
ftables provide the fastest way to keep sounds available in RAM. When using stereo files, care should be taken to keep the stereo image by using consistent playback of the two channels (of course, sometimes this is not wanted or needed). Here is a typical ftable statement:
f2 0 65536 -1 ³soundfile.sd2² 0 4 1 ; left channel |
We reserve ftable 1 for the windowing function. While using several dozens (or hundreds) of sound files, we felt the need to automate this process a bit. So we made some Applescripts for BBEdit 4.0 to write the file names and the trapezoidal window function.
There are three types of interpolation available in CMask (we encourage to use always one of them):
ipl 0 |
; linear: a straight line between initial and end value. |
There are two possible uses of random functions in CMask: (1) fixed range, (2) time-varying range. In the fixed range case, the low and high boundaries are kept constant throughout the event duration. For the time-varying range a tendency mask is employed.
Example 1
f 0 5 |
; Fixed range
|
f 0 5 |
; Time-varying range
|
In the fixed range example, the grain onsets will be constantly spread between 10 and 30 ms. In the second example, the density will begin at a 10 to 30 ms. range and will finish at a range of 1 to 2 seconds once the five-second event duration has elapsed.
There are two methods in CMask to establish transitions from random values to deterministic patterns. One is to use a tendency mask to reduce the range until a single value is reached. Another one is to set a grid of values using quant. Then change the degree of randomness around the deterministic grid.
Example 2
f 0 5 |
In this example, the playback frequency of the sound file is randomly varied within a range of 20% higher and 20% lower sample rates. This range is shrunk until the original frequency is reached after 5 seconds.
Example 3
f 0 5 |
; random function, range = 0-1 |
In this case, we set a grid for the amplitude values at an interval of .2, that is (0, .2, .4, .6, .8, 1). Given that the strength parameter is set to maximum, 1, the only amplitudes values that we¹ll get are the ones in the grid. Let¹s say that we do not want any silence (amplitude = 0). Then we set the third parameter, offset, to .1. This adds .1 to all values so we will get values from .1 to 1.1, and the grid will become (.1, .3, .5, .7, .9, 1.1). As time passes, the grid strength is reduced until reaching 0. At 5 seconds, the grid disappears and we are left with a random distribution.
Most ecological sound models are constrained to a small variation in their time-spans. Their timbral characteristics are directly linked to their evolution through time. By keeping parameters linked to the time-axis we allow for changes in their time-scale without affecting their mesostructure and without having to remap parameters. In simple words, bubble-gum functions work as a bandoneon. They adapt to the length¹ they are given. These functions are defined by:
f 0 1 |
; time-span = 1 second |
f 0 2 |
; time-span = 2 seconds |
[ ]
instead of ( )
(cf. CMask manual for details on the syntax). Thus, [1 0 ipl 0]
replaces the breakpoint function (0 1 1 0 ipl 0)
.When synthesizing complex events, such as breaking glass or multi-bouncing patterns, sometimes we need to combine several sub-events. When a seamless transition is desired half-cosine interpolation can be used to concatenate the grain distribution of two sub-events. Extending the previous example:
Example 5
f 0 5 p4 range 0 1 |
; first sub-event. |
f 5 10 p4 range 0 1 |
; second sub-event. |
By combining two sub-events of 5 seconds, we get a ten-second event with an amplitude profile going from 0-.1 to 1-1 and back to 0-.1. No discontinuity or sudden peak will be produced at 5 seconds.
accum, mask, and quant have been widely used in ecological models. So we provide some CMask examples to show how they can be employed in simple tasks. accum has been used to implement a scraper model. quant allowed us to produce a continuum of voice-like clusters which slowly turn into a rich harmonic sound (cf. Vox Populi in touch¹n¹go).
Example 6
accum
|
quant |
mask |
(Reminder: when synthesizing the examples, do not forget to place the two samples provided, in the Csound sample folder. The samples are in Sound Designer II format.)
Bartetzki, A. (1997). CMask. Csound score generator. Berlin: STEAM.
ftp://ftp.kgw.tu-berlin.de/pub/cmask/
http://www.kgw.tu-berlin.de/~abart/CMaskMan/CMask-Manual.htm
Berg, P. (1998). Algorithmic Composer Toolbox. Macintosh PPC application. The Hague.
Keller, D. (1998). Alcaucil. Csound score generator for ecologically-based granular synthesis. Burnaby, BC: Simon Fraser University.
http://www.sfu.ca/~dkeller/download.html
Keller, D. (1999a). touch'n'go / toco y me voy. Compact Disc. Burnaby. BC: earsay productions.
http://www.earsay.com
Keller, D. (1999b). touch'n'go: Ecological Models in Composition. Master of Fine Arts thesis. Burnaby, BC: Simon Fraser University.
http://www.sfu.ca/sonic-studio/srs
Keller, D., & Rolfe, C. (1998). The corner effect. Proceedings of the XXI Colloquium in Musical Informatics. Gorizia, Italy.
http://www.sfu.ca/~dkeller/CornerEffect/CornerEffect.html
Keller, D., & Truax, B. (1998). Ecologically-based granular synthesis. Proceedings of the International Computer Music Conference. Ann Arbor, IL: ICMA.
http://www.sfu.ca/~dkeller/EcoGranSynth/EGSpaper.html
Vercoe, B. (1993). Csound. Cambridge, MA: MIT Media Lab.
http://www.leeds.ac.uk/music/Man/c_front.html
http://mitpress.mit.edu/e-books/csound/frontpage.html
Examples: | 1 | 2 | 3 | 4 | 5 | 6 |
Beginners Synthesis Processing Real-Time AXCsound Composing Ecological Modeling Links Editorial Contribute Back Issues