Nodes/ComfyUI-NoiseGen/🎡 Granular Sequencer
ComfyUI Node

🎡 Granular Sequencer

Granular Synthesis Meets a Drum Machine β€” Patterned Grains

By eg0pr0xyΒ·Created about a year agoΒ·Updated about a year agoΒ· 1
🎡 Granular Sequencer
  • audio
  • sequenced_audio
β—„steps8β–Ί
β—„step_duration0.125β–Ί
β—„base_grain_size100β–Ί
β—„base_density10.0β–Ί
β—„pattern_variation0.50β–Ί
β—„swing0.00β–Ί
β—„amplitude0.80β–Ί
β—„probability1.00β–Ί
β—„velocity_variation0.20β–Ί
β—„euclidean_rhythm0β–Ί

GranularProcessor lets grains fall freely. GranularSequencer gives them a rhythm section. It's the same granular engine, but the grains are locked to a step sequencer - so instead of a drifting cloud you get patterns: rhythmic grains, probabilistic triggers, swing, and even Euclidean rhythms. If you're making breakcore textures, glitch beats, or anything with a pulse made of noise, this is the node.

What it is

A step sequencer with steps (1 to 64) and a step_duration (0.01 to 4 seconds per step). Each step can trigger a burst of grains, so the output is a rhythmic, pulsing texture rather than a continuous one. The granular controls mirror the processor: base_grain_size (10–500 ms) and base_density (1–100 grains per second) set the character of each burst, and the sequencing layer decides when bursts happen.

The groove controls are where it gets musical. swing (βˆ’0.5 to +0.5) shifts every other step later or earlier - negative swing is the stuttery, off-kilter feel, positive is the classic hip-hop bounce. pattern_variation (0–1) randomizes the pattern each loop so it never quite repeats. And euclidean_rhythm (0–32) is the fun one: pick a number and the node spaces those triggers as evenly as possible across the steps - the same algorithm behind a lot of techno and electronic percussion. 5 triggers across 8 steps gives you that spiky, off-grid pocket. 0 turns it off and every step is even.

How it works

The sequence runs through the steps in a loop; each step evaluates a probability gate and decides whether to fire a grain burst. The optional probability (global trigger chance, 0–1) and velocity_variation (0–1, randomizes loudness per burst) add the human imperfection. Each fired burst is a mini granular event built from base_grain_size and base_density at whatever step you're on.

The one output, sequenced_audio, is the full rhythmic texture. Feed it back into a FeedbackProcessor or push it through MultiDistortion and you've got instant glitch-core material.

The inputs that matter

  • steps + step_duration - the tempo and length of the pattern.
  • euclidean_rhythm - the secret weapon. Start at 5 across 8 steps and listen to what happens.
  • probability - turn it below 1 and the pattern starts breaking up in a satisfyingly random way.

Install

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

Remember the pack rule: the pip install is mandatory (scipy at module load - skip it and the whole pack fails to register). Sequencing adds statefulness, so if your pattern sounds identical every loop, that's pattern_variation at 0 doing its job - bump it up if you want evolution. And Euclidean rhythms above the step count (say, 20 over 16 steps) wrap into denser sub-patterns rather than erroring, which is fine, just surprising the first time. Match your input length to a multiple of the pattern length so the whole thing loops cleanly.

Category🎡 NoiseGen/Process

Inputs (11)

NameTypeDefaultDescription
audioAUDIOInput audio for sequenced granular processing
stepsINT81–64Number of sequence steps
step_durationFLOAT0.1250.01–4Duration per step in seconds
base_grain_sizeFLOAT10010–500β€”
base_densityFLOAT10.01–100β€”
pattern_variationFLOAT0.500–1Pattern randomization amount
swingFLOAT0.00-0.5–0.5Groove timing offset
amplitudeFLOAT0.800–2β€”
probabilityoptFLOAT1.000–1Global trigger probability
velocity_variationoptFLOAT0.200–1β€”
euclidean_rhythmoptINT00–32Euclidean rhythm pattern (0 = off)

Outputs (1)

NameTypeDescription
sequenced_audioAUDIOβ€”