ComfyUI Node

(SP) PaulStretch

Turn any sample into a 30-second ambient pad

By c0ffymachyne·Created 2 years ago·Updated about a year ago· 22
(SP) PaulStretch
  • audio_input
  • audio
stretch_factor8.0
window_size_seconds0.25

PaulStretch is the party trick of audio processing, and this is a faithful port of it. Feed it three seconds of anything - a voice, a guitar strum, a dog bark - and it gives you back a thirty-second, pitch-preserved, utterly smooth texture that sounds like it was recorded in a dream. It's the classic way to make ambient pads, drone beds, and soundtrack texture out of samples that have no business sounding like that. If you've ever heard a song that stretches a vocal into a ghostly choir, that's this algorithm.

The mechanism is a clever hack rather than a mystery: the audio is cut into overlapping windows, each window is FFT'd, the phases are randomized (killing all rhythm and transient detail), and the windows are overlapped and re-synthesized at a slower rate. Pitch stays put because the frequencies don't change - only time stretches. The algorithm is Nasca Octavian Paul's original extreme time-stretch work, and this node is a direct port of his paulstretch_python.

The two inputs that matter

  • stretch_factor - 1.0 (no change) to 100x, default 8. At 8x a 10-second sample becomes 80 seconds of pad. Past ~20x you're in full drone territory where the source becomes barely recognizable. Start at 8.
  • window_size_seconds - 0.05–10, default 0.25. This is the character knob. Smaller windows (0.1) keep more transient detail and a bit of grit; larger windows (2.0+) smooth everything into long, smeary swells. For clean ambient, go big.

One audio output comes out the right side. Yes, the math is heavy - it's an FFT per window - but on a GPU it chews through minutes of audio comfortably.

How to actually use it

The full pad recipe in this pack: Load Audio → PaulStretch (stretch 8–20, window 1–2s) → (SP) Filter highpass at ~0.1 to kill sub-bass mud → (SP) Baxandall 3 Band EQ to shape → Convolution Reverb with a plate IR. Add a slow fade on the tail and you've got a legit ambient bed without touching a DAW.

Watch out for two things. First, the algorithm adds a short fade-out to the input's end before stretching, and long windows smear the very start and end - trim your source a little longer than you think you need. Second, PaulStretch preserves pitch but kills transients, so drums and rhythm become mush. That's a feature for pads and a bug for everything else. And note the node returns the original audio untouched if you set stretch_factor to exactly 1.0 - convenient, slightly surprising.

Like every processor in the pack, it measures input LUFS and normalizes the output back to match, so a stretched wall of sound won't blast your ears relative to the source.

Installing it

ComfyUI Manager → "Install Custom Nodes" → search ComfyUI Signal Processing, or:

cd ComfyUI/custom_nodes
git clone https://github.com/c0ffymachyne/ComfyUI_SignalProcessing

then restart ComfyUI. Dependencies from requirements.txt (scipy, pyfar, torchaudio, pyloudnorm, cupy-cuda11x, ...) are handled by Manager or pip install -r requirements.txt. The repo is openly a work in progress, and since it imports the CuPy-based Limiter at startup, a CUDA/cupy mismatch will block the whole pack from loading. Worth it - this node alone justifies the install.

CategorySignal Processing

Inputs (3)

NameTypeDefaultDescription
audio_inputAUDIO
stretch_factorFLOAT8.01–100
window_size_secondsFLOAT0.250.05–10

Outputs (1)

NameTypeDescription
audioAUDIO