A granular voice reads a short window from a source table, applies an amplitude envelope, and outputs one grain
The fundamental unit of granular synthesis is the grain voice: a module that receives three parameters (start position in a source table, grain duration, and pitch/playback ratio), reads that window of samples at the requested rate, multiplies by a bell-curve or cosine amplitude envelope to avoid clicks, and outputs the shaped result. Polyphony is achieved by running many concurrent grain voices whose outputs are summed. Duration typically ranges from 1-2000 ms; overlap between successive grains fills the time between onsets, creating continuous textures. Controlling start position and pitch independently allows time-stretching or pitch-shifting. The grain envelope is essential: without it, each grain would click at onset and release.
Examples
Pd technique (chapter 21): a grain voice takes graindur, grainpitch, grainstart and uses tabread4~ to read from the source table while multiplying by a bell-curve envelope exp(-$f1*$f1) or cosine window 0.5+(cos($f1 * 3.141)/2) tabulated in a separate array.
Assessment
Explain what happens if grain duration is set to 2000 ms but overlap is 0 — what does the output sound like and why? Then describe which two parameters you would change to achieve time-stretching without pitch change.