home/ atoms/ sc-grain-perception-threshold

Grains shorter than about 50 ms transition from perceived pitch to timbre or click as duration decreases

SuperCollider’s microsound chapter (Ch 16) demonstrates perceptual thresholds for grain duration. A grain longer than ~50 ms has a clear pitch; between 15–50 ms the pitch starts fusing with timbre quality; below ~10 ms it becomes a click or transient with no discernible pitch. Additionally, short grains appear quieter than long ones at the same peak amplitude — requiring amplitude compensation. The Gabor grain (Gaussian envelope + sine) is the canonical minimal grain: its duration determines the trade-off between time resolution and frequency resolution, following the Heisenberg uncertainty principle for audio.

Examples

// Successive grain durations from pitched to click: Pbindef(\grain, \instrument, \gabor, \freq, 1000, \dur, 0.5, \sustain, 20/1000, \amp, 0.2).play; Pbindef(\grain, \sustain, 1/Pkey(\freq)); // 1 ms = click

Assessment

Set up a Gabor grain patch and reduce grain duration from 50 ms to 1 ms in steps. At what duration does pitch perception break down in your listening test? How much amplitude compensation is needed?

“// a gabor grain, gaussian-shaped envelope SynthDef(\gabor, { |out, freq = 440, sustain = 1, pan, amp = 0.1, width = 0.25 | var env = LFGauss.ar(sustain, width, loop: 0, doneAction: 2);”
corpus · the-supercollider-book-official-code-examples-scbookcode-gpl · chunk 54