Granular Synthesis
Create textures and time-stretch effects
Granular synthesis breaks audio into tiny grains and reassembles them, creating textures, time-stretching, and experimental sounds.
Basic Usage
sample("voice.wav") |> granular() |> reverb(0.5)Parameters
| Parameter | Range | Default | Description |
|---|---|---|---|
density | 1-100 | 20 | Grains per second |
size | 0.01-0.5 | 0.05 | Grain duration (seconds) |
spread | 0-1 | 0.5 | Random position offset |
pitch | 0.25-4.0 | 1.0 | Grain pitch ratio |
position | 0-1 | 0.0 | Base read position |
Examples
Ambient Texture
sample("pad.wav") |> granular(density: 25, size: 0.08, spread: 0.3) |> reverb(0.7)Glitchy Effect
sample("vocal.wav") |> granular(density: 50, size: 0.02, spread: 0.8) |> delay(1/8)Time Stretch
sample("speech.wav") |> granular(density: 30, size: 0.1, spread: 0.1, pitch: 0.5)