Nodes/ComfyUI-NoiseGen/🌟 Granular Processor
ComfyUI Node

🌟 Granular Processor

Shred Your Audio Into Clouds β€” the Granular Synthesis Engine

By eg0pr0xyΒ·Created about a year agoΒ·Updated about a year agoΒ· 1
🌟 Granular Processor
  • audio
  • granular_audio
β—„grain_size100.0β–Ί
β—„grain_density10.0β–Ί
β—„pitch_ratio1.00β–Ί
β—„grain_envelopehannβ–Ί
β—„positioning_modesequentialβ–Ί
β—„pitch_modetransposeβ–Ί
β—„amplitude0.80β–Ί
β—„grain_scatter0.00β–Ί
β—„position_offset0.00β–Ί
β—„pitch_scatter0.00β–Ί
β—„grain_overlap0.50β–Ί
β—„stereo_spread0.00β–Ί
β—„freeze_position0.50β–Ί

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. freeze is 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.

Category🎡 NoiseGen/Process

Inputs (14)

NameTypeDefaultDescription
audioAUDIOInput audio for granular processing
grain_sizeFLOAT100.01–1000Grain size in milliseconds
grain_densityFLOAT10.00.1–1000Grains per second
pitch_ratioFLOAT1.000.1–4Pitch transposition ratio
grain_envelopeCOMBOhann5 options: hann, gaussian, triangle, exponential, adsr
positioning_modeCOMBOsequential5 options: sequential, random, reverse, pingpong, freeze
pitch_modeCOMBOtranspose4 options: transpose, random, lfo, envelope
amplitudeFLOAT0.800–2β€”
grain_scatteroptFLOAT0.000–1β€”
position_offsetoptFLOAT0.000–1β€”
pitch_scatteroptFLOAT0.000–2β€”
grain_overlapoptFLOAT0.500–0.95β€”
stereo_spreadoptFLOAT0.000–1β€”
freeze_positionoptFLOAT0.500–1β€”

Outputs (1)

NameTypeDescription
granular_audioAUDIOβ€”