A World in a Grain of Sound

A pile of gravel being dumped off a truck may not sound much like a police whistle, a guiro, or a revving motorcycle. But all these sounds have something
Image placeholder title

A pile of gravel being dumped off a truck may not sound much like a police whistle, a guiro, or a revving motorcycle. But all these sounds have something in common: they are all sound complexes, sounds made up of many smaller sound events. When gravel is dumped, for example, we hear thousands of pebbles sliding along the truck bed and clicking against each other. Multiple rapid air-bursts form the police whistle and motorcycle sounds. When the guiro is scraped, dozens of individual clicks fuse into a single musical gesture. In such sound complexes, the individual sound events are similar but seldom identical, and their exact characteristics and timing are unpredictable. We perceive and remember the character of the whole complex, not the constituent sounds.

Image placeholder title

Using granular synthesis, we can build sound complexes with properties similar to the examples above, although they may sound quite different. Granular synthesis software generates and assembles a large number of very short sound bursts, or grains, to form larger-scale sound events. These events are often called clouds. Typically, grains are generated at rates of hundreds or thousands per second, so it isn't practical to "compose" each grain. Instead, granular synthesis software offers higher-level controls that shape the evolution of individual grain parameters.

In the 1940s, physicist Dennis Gabor theorized that any sound could be described by a granular representation. Gabor constructed a machine that granulated sound and performed experiments in time compression and expansion. The first musician to study Gabor's work was Iannis Xenakis. In the 1960s, Xenakis created granular sounds using tape manipulation. In 1974, Curtis Roads developed the first computer implementation of granular synthesis. Roads, a composer closely identified with the technique, has done much to make granular synthesis available to musicians. His most recent contribution is the freeware program Cloud Generator for the Mac. Roads has also published numerous landmark articles on the subject.

Since Roads's first work, many others have contributed to the art. Especially notable is composer Barry Truax, who pioneered real-time granular synthesis in the 1980s. To accomplish this, Truax had to microprogram a DSP device and write additional software for a host computer. Today, a variety of granular synthesis software is available to any desktop musician, with little or no programming involved. (See the sidebar "Granular Synthesis Tools.")

Granular synthesis, unlike subtractive or modulation synthesis, doesn't derive from conventional signal processing techniques and has no standard implementation. Curtis Roads's technical vocabulary is the closest thing to an accepted terminology for granular synthesis, and I'll use it in this article.

Let's start by looking at how a single grain is generated. It's a fairly trivial operation. The classic recipe calls for an oscillator signal with a simple amplitude envelope. An oscillator-based grain of this type is termed synthetic. Any waveform can be used in a synthetic grain, but a sine wave is probably the most common. Another approach, called sound-file granulation, uses audio samples as the source signal. Sample-based grains are called file grains.

For a grain's amplitude envelope, a smooth curve is often desirable because it doesn't produce sharp transients in the grain. The most common grain envelope is the bell-shaped curve of a Gaussian function. Shapes that approximate this curve, such as triangular or simple three-stage envelopes, are also commonly used.

Image placeholder title

FIG. 1: This figure shows a 10 ms sine-wave grain with a Gaussian envelope.

Figure 1 shows a typical sine-wave grain with a Gaussian envelope. Because of the grain's short duration, the ear registers it as a "blip" of ill-defined pitch and timbre. Taken by itself, it's a rather boring sound. However, the objective in granular synthesis is not to produce grains that are interesting individually, but to sequence these neutral-sounding blips into larger events that will interest the listener. In this context, the anonymous character of the grain is actually an asset.

Grain parameters can vary on a grain-by-grain basis. You can vary many aspects of the grain, including the waveform or sample source, and its amplitude, frequency, duration, envelope shape, and pan position. The effect of changing some of these parameters will be obvious. For example, if you synthesize 100 grains over 2 seconds and increase the frequency of each grain by a small amount, you will get some sort of pitch-sliding effect. Other parameters, such as duration and envelope shape, have effects that cannot be fully understood until we consider what happens when we arrange grains in time.

Amplitude modulation (AM) is an important component of granular synthesis. If you're not familiar with the basics of AM synthesis, you may want to look over a previous "Square One" article on that topic, which appeared in the March 1999 EM.

Image placeholder title

FIG. 2: These two tracks are examples of synchronous granular synthesis (SGS). The top track shows constant grain frequencies, and the bottom track shows grain frequencies randomized.

The easiest way to understand the relationship between granular synthesis and AM is to consider a stream of evenly spaced sine-wave grains, like that in the top track of Figure 2. This simple example, where the time intervals between grains are equal, is called synchronous granular synthesis (SGS). If the rate of grain generation, or grain density, is lower than about 20 grains per second, the grains will be perceived as a metronomic sequence of sounds. If the grain density is higher, listeners will hear a continuous signal.

SGS is equivalent to amplitude modulation of a carrier signal by a periodic modulator. The carrier, in this example, is a sine wave, and the modulator is the repeated envelopes. To figure out the modulator frequency, take the inverse of the period between one grain and the next. For example, given a period of 11/430 of a second, the fundamental modulator frequency would be 30 Hz. As in conventional AM, sidebands (sums and differences of the carrier and modulator frequencies) appear in the output spectrum.

The shape and duration of the envelopes determine the modulator waveform and therefore its spectrum. In general, envelopes with sharp rise and fall times will generate stronger high-frequency content than smooth envelopes. Thus the choice of envelope can have a considerable effect on the number and strength of the sidebands.

SGS isn't the most typical application of granular synthesis; it's a rather cumbersome way to produce AM effects. (To get ordinary AM, use ordinary signal generators.) However, SGS does let you vary one or more parameters per grain, leading to complexities difficult to produce with AM alone. In the bottom track of Figure 2, the frequency of each grain is random within a 50 Hz to 2 kHz range. We could analyze this as amplitude modulation of a carrier that is also being frequency modulated by a quasi-random step waveform.

Asynchronous granular synthesis (AGS), in which grains are distributed randomly over some period of time, is a more widely used form of granular synthesis. AGS works like a sonic spray gun, scattering droplets of sound instead of paint. By definition, AGS involves some degree of aperiodicity in the timing of the grains. The effect is often similar to AM with band-limited noise as the modulator signal; there is random sideband energy, which is perceived as noise.

The term cloud is particularly appropriate for AGS-generated events. Like natural clouds, an AGS cloud is made up of randomly configured particles. Rather than arranging all details of the grains that make up the cloud, you specify the duration of the cloud and the way various grain parameters will change over that period of time. Grain density, frequency, amplitude, panning or multichannel dispersion, waveform, and envelope shape may all be variable over the life of a cloud, depending on what software you use. Non-real-time programs like Cloud Generator require you to give initial and final values for the parameters you want to change, before the software generates the grains. Real-time programs, like Chris Rolfe's MacPOD and Rasmus Ekman's Granulab, let you conduct the cloud-generating process as you listen.

The frequency content of a cloud determines whether it will have a strong pitch center. Clouds in which all grain frequencies are the same, or fall within a narrow range, tend to have a perceptible pitch, somewhat like bandpass-filtered noise. If grain frequencies are dispersed over a wide range, the cloud will sound more like broadband noise. Low and high boundaries for grain frequency may be specified in terms of bandwidth or as a frequency deviation from a center value.

Image placeholder title

FIG. 3: This is a 1-second example of asynchronous granular synthesis (AGS). As the grain density increases, the amplitude decreases.

Figure 3 illustrates a simple 1-second cloud in which the grain density increases while the grain amplitude decreases. For this cloud, the initial and final values for grain density were 30 and 60 grains per second. The initial and final amplitude values were 60 percent full-scale and 0. Frequency and all other parameters were held constant. This cloud sounds like a series of rattling pitched-noise sounds, gradually accelerating while diminishing in volume. The rate of acceleration and the volume fade are random. This unpredictability imparts a certain liveness to the sound. Note that some of the grains in Figure 3 overlap, which is common in AGS and can easily lead to clipping. To avoid clipping, you may find it necessary to lower the grain amplitude range.

Generating grains from prerecorded audio files brings additional complexity to granular synthesis. A grain's waveform may be read from any point in a sound file, in any order. Thus, a huge number of different waveforms may be derived from a single file, simply by varying the read pointer. There are many different algorithms for selecting samples from a source file. The simplest approach would be to use samples as source material for SGS. This can be done by repeatedly playing back samples, given a start point and length.

A more interesting variant would be to move the start point progressively from the start to the end of the source file, which can produce unusual time compression or expansion effects. For example, a 2:1 expansion occurs when the cloud length is twice the source-file length. Usually, the result has more artifacts than you'd get from commercial time-warping products; you can get a variety of fashionably lo-fi sounds, especially if you use more percussive envelopes.

Of course, you can introduce randomness into the sample selection process. At one extreme, you can grab samples at random from an input file, utterly garbling the source signal. Another approach is statistical evolution, which means that, at the beginning of the cloud, there is a higher probability that samples will be taken from the beginning of the file; by the end of the cloud, there is a higher probability that samples will come from the end of the file. Statistical evolution still scrambles the source file, but it retains some of the original signal's shape, dynamics, and identity.

If you don't have granular synthesis software, or you simply want to try another approach, you can approximate granular synthesis with your favorite sequencer and synthesizer or sampler. The idea is to generate "grains" using a simple oscillator-plus-envelope patch, or a short sample. (Claves, closed hi-hats, and other percussion work well.) You can trigger the grains by rapidly playing back MIDI sequences with short event durations. The amplitude, pitch, and other contours of the resultant "clouds" can be shaped by note and Velocity data and continuous controllers. A lot of editing is required to produce a single cloud! However, modern sequencers can help out quite a bit by generating or randomizing streams of controller events.

This method has its limitations. For instance, the MIDI transmission rate will limit the rate of grain generation, as will the characteristics of the receiving device. MIDI resolution on pitch, amplitude, and other parameters is not as good as that found in direct granular synthesis. Furthermore, some sequencers and synthesizers will behave erratically or even crash if the rate of events is too high. I'll leave debate over whether this technique qualifies as true granular synthesis to purists. I think of it as the "Poor Person's Granular Synthesis" (PPGS). Despite its drawbacks, PPGS can yield interesting sounds. I've used it extensively in one composition ("Projectile," 1987) and occasionally in others. I'm sure I'm not the only EM reader crazy enough to try something like this!

Try out some of the software listed in the sidebar, and you may discover an exciting new way to generate and manipulate sound. There are thousands of grains out there just waiting to be synthesized.

John Duesenberry's electronic music is available through the Electronic Music Foundation. Check the EMF catalog at www.emf.org.


The good news is that granular synthesis software abounds on both the Mac and PC platforms. The better news is that much of it is free or very inexpensive.

If you're a Macintosh user, you'll definitely want to get ahold of Chris Rolfe's award-winning MacPOD (www3.bc.sympatico.ca/thirdmonk), which is a real-time, MIDI-controllable file-granulation program. MetaSynth, by U&I Software, offers granular synthesis-based effects in its Effects palette. A demo is available at www.uisoftware.com. ThOnk_0+2 (www.audioease.com) is a file-granulation program by Arjen van der Schoot, who boasts that composers can use the free program "without having to think at all." Just provide an input file, and thOnk_0+2 will generate reams of material. Despite its name, Mike Berry's GrainWave 3 (www.nmol.com/users/mikeb) does much more than granular synthesis. It's a real-time software synthesizer with a grain operator that generates both synthetic and file grains. James McCartney's SuperCollider (www.audiosynth.com) also supports real-time granulation; some coding is required. Curtis Roads's classic Cloud Generator, which is not a real-time application, is available through Tom Erbe's Mac computer-music Web site (shoko.calarts.edu/~tre/CompMusMac).

The Windows platform also has some excellent granular synthesis programs. Rasmus Ekman's real-time Granulab (hem.passagen.se/rasmuse/Granny.htm) handles both file and synthetic granulation and includes refinements such as patch storage, MIDI control, and mouse-controlled crossfades between patches. The full registered version can generate up to eight grain streams at once. Ross Bencina's AudioMulch (www.audiomulch.com) is a full-featured, real-time software synthesizer with a granulator that takes its input from a delay line. Chaosynth (www.nyrsound.com) does real-time granular synthesis, filtering, and reverb with grains generated by cellular automata. It will also produce a MIDI file from the granular data. (A new version is NT-compatible.) Finally, the U.K.-based CDP (www.bath.ac.uk/~masjpf/CDP/CDP.htm) has recently added GrainMill, a file- and synthetic-granulation program, to its collection of inexpensive synthesis programs. CDP's Groucho signal-processing package also contains a set of grain-manipulation tools.

The Csound language (Mac, Windows, Linux, BeOS, other platforms) includes several granular unit generators. Csound is available from http://mitpress.mit.edu/e-books/csound/frontpage.html. You might start with the relatively simple grain generator, then graduate to the more complex granule, which accepts no fewer than 22 parameters! Tom Erbe's CornBucket utility takes another approach: it generates a Csound score file consisting of zillions of grain events. Get it at Erbe's site (see above).

One final cross-platform option is the Kyma System from Symbolic Sound. This hardware-accelerated synthesis workstation has so many built-in tools for granular synthesis that it definitely deserves a look. You'll find numerous presets ready to splice and dice any sound you throw at them, plus built-in granular sound generators that can employ any basic waveform you want. Kyma can do granular synthesis in real time, with all the parameters live and tweakable. Have a look at www.symbolicsound.com/kyma.html for an introduction to the system.


If you want to find out more about granular synthesis, the first place to look is the writings of Curtis Roads; see the discussion and bibliography in his Computer Music Tutorial (MIT Press, 1996). Also look at the excellent and practical Cloud Generator manual. Representations of Musical Signals (MIT Press, 1991) also has a chapter on granular synthesis, though much of it is highly technical. Barry Truax describes his mid-1980s work programming for real-time granular synthesis in Computer Music Journal 12, no. 2 (summer 1988). Also worth noting is Michael Berry's in-depth description of his GrainWave program, published in Computer Music Journal 23, no. 1 (spring 1999).

Commercial recordings featuring granular synthesis are not widely available. Riverrun, by Barry Truax, is included on his Digital Soundscapes CD (Wergo 2017-50). Curtis Roads's nscor, which uses granular and many other techniques, is found on New Computer Music (Wergo 2010-50). Concret PH, an early work by Iannis Xenakis, incorporated granular textures and is available from the Electronic Music Foundation at www.emf.org.