WaveStack is on the iOS App Store

Introduction to Sound Synthesis Beyond subtractive

Granular

Granular synthesis builds a sound from many short sounds called grains, each from a few milliseconds to a few hundred milliseconds long and shaped by its own envelope. The grains can be cut from a recording, which lets an instrument stretch, freeze and repitch it, or generated by an oscillator, which produces clouds of short tones with no recorded source.

The physicist Dennis Gabor proposed in 1947 that any sound could be described as a series of very short acoustic events. The composer Iannis Xenakis built Analogique B (1959) from short fragments of sine tones spliced together on tape, and the composer Curtis Roads made the first computer implementations of granular synthesis in the 1970s, also with grains generated rather than recorded. The composer Barry Truax, at Simon Fraser University in Canada, made granular synthesis run in real time in 1986 for Riverrun, which uses generated grains, and the following year built The Wings of Nike from grains of two recorded vocal sounds, each about 170 milliseconds long.

The first tool below takes its grains from the two recordings used in the sampling chapter, a melodic phrase that ends in a held chord and one bar of drums. The other two generate their grains with an oscillator, one grain at a time and then as a cloud.

Grains from a recording

Short grains are taken from the recording at a position you set, each shaped by an envelope, and played many times a second. Position, scan, pitch, grain size, density, spray and envelope shape each have their own control.

Recording
Envelope

Listen for With Scan at 0 the sound freezes at one point in the recording and holds for as long as the tool plays. Changing Pitch moves the frozen sound up or down without moving it in time. Short grains sound buzzy and dense, and long grains sound smoother and closer to the original recording. Spray takes each grain from a slightly different point around the position, which blurs the neighbouring sounds together. The rectangle envelope adds a click to the start and end of every grain, which at this density is heard as a rough, crackling layer over the sound.

Grains

A grain is a short sound, typically between 10 and 200 milliseconds long, multiplied by an envelope that fades it in and out. A granular instrument plays many grains a second, usually overlapping, and its main controls set how long each grain lasts, how many start each second (the density), and where each one comes from. At a few grains a second each grain is heard as a separate event. At tens of grains a second the grains overlap and are heard as one continuous sound whose texture depends on their length and envelope.

Position and pitch

On a sampler, the playback speed sets both the pitch and how fast the playhead moves through the recording. Because every grain is short, a granular instrument can set these separately: the position the grains are taken from can move at any speed, including not at all, and the pitch each grain plays at has its own control. Moving the position slower than real time stretches a sound without lowering its pitch, and holding the position still freezes one moment of the recording. Scattering the grains around the position, called spray here and jitter on some instruments, takes each grain from a slightly different point near the position, which blurs the sounds around that point together.

Grain envelopes

Every grain is multiplied by an envelope, also called a window, that sets how its level rises and falls. A grain is so short that its envelope is a large part of what is heard. A rectangular envelope switches the grain on and off abruptly, and each sudden step contains energy across a wide range of frequencies, which is heard as a click and shows in the spectrum below as a broad spread of energy above and below the grain's frequency. The raised cosine, or Hann, envelope and the Gaussian envelope fade the grain in and out smoothly, which removes the clicks and keeps the energy close to the grain's frequency. A trapezoid holds the grain at full level between two short fades, so more of the source is heard at full level, with a little more spread than the raised cosine. The decaying envelope starts at full level and falls away, which gives each grain a plucked attack, and the rising envelope swells and then stops abruptly, like a reversed sample.

The length of a grain also sets how widely its energy spreads in frequency, whatever the envelope: halving the length doubles the width of the band the grain occupies. A 5 ms grain of a 440 Hz sine wave contains about two cycles and is heard as a click with only a faint pitch, and a 100 ms grain of the same sine wave is heard as a short tone. Gabor's own elementary signals used a Gaussian envelope, which has the narrowest spread in frequency for a given length in time. The tool below plays a stream of single sine-wave grains and draws one of them, with its envelope, beside its spectrum.

One grain, its envelope and its spectrum

Grains of a 440 Hz sine wave play a few times a second. The left plot shows one grain and its envelope, and the right plot shows the grain's spectrum in decibels against frequency.

Envelope

Listen for With the rectangle, every grain starts and ends with a click, and the spectrum shows energy spread far above and below 440 Hz. The raised cosine and the Gaussian remove the clicks and narrow the spectrum. The decaying envelope sounds plucked and the rising envelope sounds reversed. At 5 ms every envelope sounds like a click, and at 200 ms they all sound like short tones, with only the rectangle still clicking.

Synthetic and sampled grains

A granular instrument can take its grains from a recording or generate them. Sampled granular synthesis, also called granulation, cuts grains from a recording or a live input, so the result keeps the timbre of the source: grains from a voice still sound vocal, and grains from a drum loop still contain drum hits. Its controls change the timing, pitch and texture of a sound that already exists, which is why it is used for time-stretching, freezing and smearing recordings. Synthetic granular synthesis generates each grain with an oscillator, so each grain's frequency, waveform and envelope can be set separately, and the sound depends on those settings and on how the grains are spread in time and frequency. Xenakis's tape pieces, Roads's early programs and Truax's Riverrun all worked this way.

A synthetic cloud with grains at random times and frequencies spread over a range sounds like a texture of short tones, and at high densities with short grains it sounds like filtered noise. With the grains at regular times and one frequency, and each grain shorter than the gap between grains, the grain rate becomes a pitch of its own: 100 grains a second, each 5 ms long, produce a tone with a pitch of 100 Hz, and the frequency inside each grain produces a peak in the spectrum, a formant, at that frequency. When the grains are longer than the gap, they overlap and merge into a steady tone at the frequency inside them. The researcher Xavier Rodet's formant wave functions, used in the CHANT program at IRCAM in Paris to synthesise singing voices, produce vowels from regular streams of grains in this way.

The two approaches suit different work. Sampled grains need a recording and inherit its character, and they are the usual way to stretch, freeze or repitch a sound. Synthetic grains need no source, and because every grain is generated, its pitch can be set exactly, including to frequencies outside any scale. On this site, GSX is a synthetic granular voice for VCV Rack based on Truax's system, and Flock plays each call of a simulated flock of birds as a grain, either synthetic or, with the Flock In expander, cut from live audio.

A cloud of synthetic grains

Sine-wave grains play at a density you set, each at a frequency chosen at random within a range around the centre frequency. The plot shows each grain as a short bar placed by its start time and frequency.

Timing

Listen for With Spread at its widest and Timing on Random, the grains form a scattered cloud of short tones. Narrow the spread to 0, set Timing to Regular and shorten the grains to about 5 ms, and the grains merge into one buzzing tone whose pitch follows the density: at 100 grains a second the pitch is 100 Hz. Moving Centre then changes the tone's vowel-like colour rather than its pitch. Lengthen the grains past the gap between them and the buzz gives way to a steady tone at the centre frequency. Very short grains at a high density sound like filtered noise.

Common questions

What is granular synthesis?

Granular synthesis builds a sound from many short sounds called grains, each typically 10 to 200 milliseconds long and shaped by its own envelope, and often overlapping. The grains can be cut from a recording or generated by an oscillator.

What is a grain envelope?

A grain envelope, also called a window, sets how a grain's level rises and falls. A rectangular envelope starts and stops the grain abruptly, which produces a click at each edge. Smooth envelopes such as the raised cosine (Hann) or Gaussian shapes fade the grain in and out, so it starts and ends without a click and its energy stays close to its own frequency.

What is the difference between synthetic and sampled granular synthesis?

Sampled granular synthesis, also called granulation, cuts its grains from a recording or a live input, so the result keeps the timbre of the source. Synthetic granular synthesis generates each grain with an oscillator, so each grain's frequency, waveform and envelope can be set separately, and the sound depends on how the grains are spread in time and frequency.

How does granular time-stretching work?

A granular instrument takes its grains from a position in the recording and plays each grain at its own pitch. Moving the position more slowly than real time makes the sound last longer without lowering its pitch, and holding the position still freezes one moment of the recording.

Published Glossary