Nodes/ComfyUI-AudioReactive/Smoosh (Audio Op)
ComfyUI Node

Smoosh (Audio Op)

Smoosh — gentle compression that pulls quiet passages up into the mix

By dmarx·Created 3 years ago·Updated 2 years ago· 11
Smoosh (Audio Op)
  • signal
  • SIGNAL

OpSmoosh (display name "Smoosh (Audio Op)") is the friendly half of the pack's curve-shaping pair. Where Stretch makes a signal punchier by pushing quiet parts down, Smoosh pulls them up - it compresses the dynamic range so the whole curve sits closer together. It's the audio-reactive equivalent of a compressor with the ratio turned way up.

The implementation, straight from nodes/audio_utils.py:

def smoosh(y, sr):
    y = normalize(y, sr)
    return normalize(y**.5, sr)

Normalize (abs + divide-by-peak) first, then take the square root, then normalize again. Square root of values in [0, 1] raises them - 0.25 → 0.5, 0.01 → 0.1 - so the quiet bits climb while the peak stays pinned at 1. That's genuine compression, and it's almost certainly what Sqrt was meant to be (the Sqrt node in this pack actually computes y**-2, an inverse square - a mislabeled mess; Smoosh is the real square-root behavior).

Why you'd reach for it

In a ARReadAudio → Rms → SignalToCurve style chain, a raw RMS envelope can be too spiky or too dead - quiet sections drop to near-zero and your animation sits frozen between hits. Dropping Smoosh in before SignalToCurve keeps the loud hits strong while keeping the quiet passages visibly alive, so the motion never fully stops. It's also a good safety valve: if a feature curve is getting lost under the noise floor, smoosh it to give the low end a presence.

Think of it as the complement to Stretch: stretch for snappy, staccato, beat-locked energy; smoosh for continuous, breathing, always-moving animation. Run both off the same Rms output into two different drivers and you've got two complementary moods from one track.

Inputs and outputs

  • signal (SIGNAL) - typically a feature curve (Rms, Novelty); works on raw waveforms too.
  • SIGNAL - y replaced by the smooshed curve, same length, non-negative, peak at 1. Feed into SignalToCurve or check with ARDrawSignal.

Installing it

Manager (search "AudioReactive") or:

cd ComfyUI/custom_nodes
git clone https://github.com/dmarx/ComfyUI-AudioReactive

Restart and sit through the first-load auto-install of scipy, scikit-learn, librosa, loguru (librosa drags in numba, so that first start is slow). If the pack won't load with ModuleNotFoundError: No module named 'keyframed', pip install keyframed - it's imported at startup but not in the auto-install list.

Common issues

  • Output is fully positive, never negative - expected; it's an envelope shaper, not a waveform copier.
  • The curve looks compressed / lacks punch - yes, that's the entire point. If you want punch instead, that's Stretch.
  • Don't confuse it with Sqrt - different math, misleadingly similar names. Smoosh is the square-root one that works; Sqrt is the inverse-square one. Read the OpSqrt page before you build on it.
  • Early-port reality check - this is a working core op in a fresh single-commit pack; the parameterized ops are unwired stubs. The working set (Rms, Novelty, Smoosh, Stretch, Normalize, Pow2, Harmonic, Percussive, Predominant_Pulse) is solid enough to build real workflows on.
CategoryAudioReactive/Operators

Inputs (1)

NameTypeDefaultDescription
signalSIGNAL

Outputs (1)

NameTypeDescription
SIGNALSIGNAL