Sanic Boom

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

ParameterRangeDefaultDescription
density1-10020Grains per second
size0.01-0.50.05Grain duration (seconds)
spread0-10.5Random position offset
pitch0.25-4.01.0Grain pitch ratio
position0-10.0Base 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)

On this page