π Granular Processor
Shred Your Audio Into Clouds β the Granular Synthesis Engine
- audio
- granular_audio
Granular synthesis is how you take an ordinary sound and turn it into a shimmering cloud that barely resembles its source. This node is the pack's full-featured take on it: cut the audio into tiny overlapping grains, scramble when and where they play, pitch-shift them, and reassemble the result into something new. It's the engine behind a lot of ambient and glitch music, and it works on anything - including your own noise.
What it does
You feed in any audio and it comes back as granular_audio - a texture made of thousands of tiny slices. The core dials are grain_size (1β1000 ms, how long each slice is) and grain_density (0.1β1000 grains per second, how thick the cloud is). Small grains + high density = the classic granular hiss/chorus. Large grains + low density = recognizable chunks drifting past.
pitch_ratio (0.1β4) transposes the grains without changing their playback speed - this is the magic that turns a voice into a choir or a noise bed into a choir of noise. grain_envelope chooses the shape that fades each grain in and out (hann, gaussian, triangle, exponential, adsr) - the envelope is what stops the grains from clicking at the edges, and gaussian is the smooth one most people end up on.
How it works
Classic granular mechanics: the source is chopped into grains of grain_size, each grain gets an envelope applied, and grains are scattered across the timeline by positioning_mode - sequential plays the source in order, random jumps around, reverse plays backwards, pingpong bounces, and freeze locks onto one spot and loops it forever (an instant drone machine). pitch_mode decides how pitch behaves: transpose (fixed ratio), random, lfo, or envelope (pitch follows an internal envelope - great for swelling textures).
The optional controls refine the chaos: grain_scatter and position_offset randomize where grains grab from, pitch_scatter widens the pitch spread, grain_overlap controls how much grains bleed into each other, stereo_spread widens the cloud across the channels, and freeze_position chooses the spot used by freeze mode.
The inputs that matter
grain_size+grain_density- the pair that defines the sound. Start at ~100 ms / 10 grains/s and move from there.pitch_ratio- the most musical control here. 0.5 drops an octave, 2.0 raises one.positioning_mode- the most creative one.freezeis a cheat code for instant drones.
Install
The standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/eg0pr0xy/comfyui_noisegen.git
cd comfyui_noisegen
pip install -r requirements.txt
Windows embedded Python: ComfyUI\python_embeded\python.exe -m pip install -r requirements.txt. Or ComfyUI Manager, search "NoiseGen" / eg0pr0xy. No models, no keys.
Gotchas
The pack-wide rule applies: don't skip the pip install (scipy is loaded at import; skip it and nothing in the pack registers). Granular processing is CPU-heavy by nature - at high densities (hundreds of grains/sec) and long durations it's the most compute-hungry node in the pack, so don't be alarmed if a 60-second render takes a moment; it's doing thousands of envelope-windowed slices. And a tip: feed it a single short sound (or freeze_position on a noise generator) rather than a long file when you're still learning the controls - the grains are the instrument, the source barely matters.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | Input audio for granular processing | |
| grain_size | FLOAT | 100.01β1000 | Grain size in milliseconds |
| grain_density | FLOAT | 10.00.1β1000 | Grains per second |
| pitch_ratio | FLOAT | 1.000.1β4 | Pitch transposition ratio |
| grain_envelope | COMBO | hann | 5 options: hann, gaussian, triangle, exponential, adsr |
| positioning_mode | COMBO | sequential | 5 options: sequential, random, reverse, pingpong, freeze |
| pitch_mode | COMBO | transpose | 4 options: transpose, random, lfo, envelope |
| amplitude | FLOAT | 0.800β2 | β |
| grain_scatteropt | FLOAT | 0.000β1 | β |
| position_offsetopt | FLOAT | 0.000β1 | β |
| pitch_scatteropt | FLOAT | 0.000β2 | β |
| grain_overlapopt | FLOAT | 0.500β0.95 | β |
| stereo_spreadopt | FLOAT | 0.000β1 | β |
| freeze_positionopt | FLOAT | 0.500β1 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| granular_audio | AUDIO | β |