Nodes/KJNodes for ComfyUI/Sound Reactive
ComfyUI Node Runs on cloud

Sound Reactive

Drive your generation from a live microphone

By kijai·Created 3 years ago·Updated about 17 hours ago· 2,930
Sound Reactive
    • sound_level
    • sound_level_int
    sound_level1.00
    start_range_hz150
    end_range_hz2000
    multiplier1.00
    smoothing_factor0.50
    normalizefalse

    Where this pack's NormalizedAmplitude* nodes bridge to a separate pack (AudioScheduler) for analyzing a pre-recorded audio file, Sound Reactive skips all of that and goes straight to your browser's live microphone input. No extra pack required. Point it at your mic, and it outputs a continuously updating sound level you can wire into anything numeric - a mask size, a strength value, a CFG scale - to make your generation respond to sound in real time as it happens, rather than to something pre-analyzed.

    This is explicitly built for realtime, autoqueue-driven diffusion - the live-visual/VJ end of ComfyUI, not a normal batch workflow. If you're not running with auto-queue on, this node will just report whatever the mic level happened to be at the instant you clicked Queue, which defeats the point.

    The inputs and outputs that matter

    • sound_level (default 1) - this widget gets driven live by the browser's mic-input JavaScript once capture is running, similar to how a couple of other browser-integrated nodes in this pack work.
    • start_range_hz / end_range_hz (default 150–2000) - the frequency band the node actually listens to. This is the single most important pair to get right: a kick drum lives low, roughly 20–150Hz, while vocals and most melodic content sit higher. If your reaction feels dead or delayed, you're very likely band-passing the wrong part of the spectrum for your source material.
    • multiplier (default 1) - scales the raw level up or down before it's output.
    • smoothing_factor (0–1, default 0.5) - how much the output is smoothed frame to frame. Higher smoothing kills jittery per-frame spikes but also softens sharp hits; lower smoothing tracks transients more faithfully but can look twitchy.
    • normalize (default off) - turn this on if your source's loudness swings wildly between quiet and loud sections, so downstream nodes get a more consistent range instead of raw levels that can spike as high as your mic's gain happens to allow.
    • Outputs: sound_level (float) and sound_level_int (an integer version of the same value, for anything downstream that wants a whole number instead).

    How to install it

    Standard KJNodes install, no separate pack needed for this node specifically: ComfyUI Manager → search "KJNodes for ComfyUI" → install, or cd ComfyUI/custom_nodes && git clone https://github.com/kijai/ComfyUI-KJNodes, pip install -r ComfyUI-KJNodes/requirements.txt, restart.

    Common issues & troubleshooting

    No sound is registering at all. Browsers gate microphone access behind a permission prompt, same as the screen-capture node in this pack - check your browser hasn't silently blocked mic access for the ComfyUI page.

    The output barely moves. Check start_range_hz/end_range_hz first - a band that doesn't overlap with the actual content of your audio source will read as nearly flat no matter how loud things get. Widen the range or retarget it to where your source's energy actually lives.

    Only updates once per queue. You need auto-queue running for this to behave like a live feed; a single manual run just samples the mic once.

    CategoryKJNodes/audio

    Inputs (6)

    NameTypeDefaultDescription
    sound_levelFLOAT1.000–99999
    start_range_hzINT1500–9999
    end_range_hzINT20000–9999
    multiplierFLOAT1.000.01–99999
    smoothing_factorFLOAT0.500–1
    normalizeBOOLEANfalse

    Outputs (2)

    NameTypeDescription
    sound_levelFLOAT
    sound_level_intINT