The slope of the grain envelope controls the spectrum: sharper attacks produce broader bandwidths
Every grain has an amplitude envelope shaping its onset and offset. A short linear attack and decay first exist to prevent clicks at grain boundaries, where the waveform would otherwise jump discontinuously. Beyond click prevention, the envelope’s slope has spectral consequences: a sharp attack behaves like multiplying the grain by a near-rectangular window, which broadens frequency content (a windowing/Gibbs effect), while a softer Gaussian or Hann envelope keeps energy close to the grain’s fundamental. Very short grain durations broaden bandwidth the same way. Sound designers exploit this to dial between pure, pitched clouds (soft envelopes, moderate durations) and noise-like, broadband textures (hard envelopes, short durations).
Examples
A 440 Hz sine grain with a Hann window sounds nearly pure; the same grain with a rectangular (boxcar) envelope sounds like a brief burst with sidebands. Sweeping envelope slope from soft to hard is a timbral morphing tool.
Assessment
Predict the spectral difference between a 20 ms grain with a sharp linear attack and one with a Gaussian attack. Explain when this spectral broadening is desirable and when it is not. Design a texture where envelope slope is mapped to an expression controller.