What is granular synthesis?¶
Opening hook¶
Imagine you have a vinyl record playing a single piano note. The note holds steady for thirty seconds. Now imagine you pick up the needle, drop it back on the same groove, wait a few milliseconds, and repeat โ ten times a second. You'll hear a rapid stutter. The original piano note is in there, but the sound itself is something new: a buzzing, textured drone stitched together from tiny snippets of the original.
That's granular synthesis. The technique takes any recorded sound, slices it into fragments shorter than a human ear can resolve individually, and resynthesizes a new sound out of the overlap.
The core idea¶
A grain is a short audio fragment โ typically between one millisecond and half a second long โ taken from a source recording and shaped by a smooth amplitude envelope at both ends so it doesn't click when it starts or stops. By itself a single grain sounds like what it is: a tiny snippet of sound. The interesting part starts when you spawn many grains in rapid succession, each from a slightly different position in the source buffer, and let them overlap. Your ear can't resolve individual grains below about twenty per second, so above that rate the grains fuse into a continuous texture.
Four variables define how that texture sounds. Grain size โ how long each grain is โ controls whether you hear something pad-like (longer grains, more of the original sample audible in each) or percussive (shorter grains, each heard as a pointillistic click or pluck). Density โ how many grains spawn per second โ controls whether the result sounds sparse and rhythmic (low density, grains heard as discrete events) or smooth and continuous (high density, grains overlapping into a wash). Position โ where in the source audio each grain is sliced from โ lets you hold a single moment of the source or scan through it at any speed you like, including backwards. Pitch โ the per-grain transposition โ lets you shift the perceived pitch of the resynthesized sound without changing how fast the position scans, because each grain is short enough that the pitch-shift is effectively instantaneous.
Those four knobs are the heart of every granular patch ever made. Every other granular control โ jitter, spread, window shape, trigger patterns, modulation โ is a variation or a decoration on top of them.
The technique was first theorized by the physicist Dennis Gabor in 1947, in a paper called Theory of Communication. Gabor wasn't a composer; he was working on a mathematical decomposition of signals into elementary time-frequency atoms. Musically, the technique was first put into practice by Iannis Xenakis in the late 1950s โ he assembled grain sequences by hand, cutting and splicing magnetic tape, because no computer of the era could do it in real time. Curtis Roads wrote the software implementations that made granular synthesis practical on computers in the 1970s and 1980s, and his book Microsound (2001) remains the canonical reference.
The diagram above shows a source waveform (the piano note) with three grain windows overlaid at different positions. Each grain takes a small slice of the source and multiplies it by a smooth envelope that fades in and out. The grains overlap each other, and the listener's ear blends them into a continuous texture.
In Grainulator¶
Everything above maps directly to controls on the GRAIN tab:
-
Sizesets the grain length, from 1 ms (so short you hear each grain as a click or as its own pitch) to 500 ms (so long it sounds almost like the original sample playing). Most musical pad textures live in the 30โ200 ms range. -
Densitysets how many grains spawn per second. At low values (below about 10 Hz) you hear discrete grain events โ useful for rhythmic, pointillistic patches. Above about 20 Hz the grains fuse into a continuous wash; above about 100 Hz the grain-spawn rate itself starts to be heard as pitch. -
Pitchtransposes each grain up or down by a number of semitones at the moment it spawns. Because grains are short, you can pitch-shift them dramatically without the time-stretching artifacts you'd hear from pitch-shifting the entire sample in real time. -
The position cursor on the waveform display sets where in the source audio each grain is sliced from. Hold the cursor still and you get a "frozen" sound at one moment of the source. Sweep it with the
Speedknob, or modulate it from the MOD tab, and you scan through the source in time.
The TEXTURE tab adds the window shape that each grain is multiplied by โ Hanning for smooth pads, Trapezoid or Pluck for percussive attacks โ plus pitch-variation and scan controls that modulate the core four parameters over time. The MOD tab lets you route any of those parameters to an LFO, envelope, or clock-synced rhythmic source to put the whole patch into motion.
The math, for the curious
A grain is a finite-length signal \(g(n)\) formed by multiplying a source signal \(s(n)\) by an envelope window \(w(n)\):
where \(L\) is the grain length in samples and \(n_0\) is the read position in the source buffer. The window function \(w(n)\) is typically a Hann or Tukey window โ smooth at both ends so that the product of source-times-window fades in and out without an audible click. The output of the granular synthesizer is the sum of many overlapping grains, each spawned at its own start time \(t_i\):
Density is the rate \(\lambda\) at which spawn times \(t_i\) are scheduled โ either uniformly (every \(1/\lambda\) seconds) or stochastically (Poisson-distributed around a mean rate of \(\lambda\)). Pitch shifting is implemented by reading the source buffer at a different speed inside each grain: a per-grain resampling that doesn't affect the overall playback rate, because each grain is short enough that the resampling is inaudible as a time stretch.
Curtis Roads' Microsound (MIT Press, 2001) derives all of this formally, connects it to the Fourier-style time-frequency decomposition Gabor originally proposed, and is the canonical reference for anyone who wants to dig further.
Further reading¶
- Microsound, Curtis Roads (MIT Press, 2001) โ the definitive book on granular synthesis theory and practice.
- Theory of Communication, Dennis Gabor (Journal of the Institution of Electrical Engineers, 1946) โ the original mathematical paper that introduced the grain concept.
- Formalized Music, Iannis Xenakis (Indiana University Press, 1971) โ the first composer to put the theory to musical use writes about it in his own words.
See also¶
- GRAIN tab reference
- Your First Patch โ apply this theory in ten minutes.