Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

ComfyUI Audio Visualizer

Audio visualizer nodes for ComfyUI, replicating audio-visualizer.com: load audio, pick a style, tune the look, get an image batch (+ alpha mask) you can turn into a video — including transparent overlays.

Nodes

Built on the ComfyUI V3 node API (io.ComfyNode + io.Schema, registered via ComfyExtension/comfy_entrypoint). Requires a ComfyUI version with comfy_api.latest (0.33 tested).

Audio Visualizer Analyze — AUDIO → AUDIO_FEATURES Precomputes one spectrum + waveform slice per video frame, mimicking the browser's Web Audio AnalyserNode (Blackman window, dB scaling −100..−30, temporal smoothing).

Input Matches site control
fps video frame rate (site renders live at ~60)
fft_size "Detail (FFT)" — 32..2048
smoothing "Smoothing" — 0.8 default
sensitivity "Sensitivity" — 1.4× default

Audio Visualizer Render — AUDIO_FEATURES → IMAGE + MASK + fps Renders the frames. style covers all 8 site styles: bar, wave, line, radial_bars, mirror_bars, mountain, blob, siri. Also: width/height, color (hex), background (transparent/dark/light/custom), bar_width, gap, line_width, amplitude.

Analysis and rendering are separate nodes on purpose: the FFT pass is cached by ComfyUI, so switching styles or colors re-runs only the (cheap) render node.

Live preview

The Render node embeds a live canvas preview (js/audio_viz_preview.js) — press ▶ Play on the node and the browser analyzes the connected audio with a Web Audio AnalyserNode (the same model the offline analysis mimics) and draws the selected style in realtime. Tweaking style/color/bar width/etc. updates the preview instantly, without running the graph. The audio file is resolved by walking upstream Render ← Analyze ← LoadAudio.

The preview is a draft (analyser smoothing runs at display rate, not at the export fps), so the exported video can differ subtly — same look, not frame-identical.

Typical workflow

LoadAudio ─→ Audio Visualizer Analyze ─→ Audio Visualizer Render ─→ CreateVideo ─→ SaveVideo
     └────────────────────────────────(audio)──────────↗
  • Solid background video: set background to dark/light/custom, wire images into CreateVideo along with the original audio.
  • Transparent overlay (site's WebM-with-alpha): keep background = transparent and use the MASK output — e.g. composite over footage with ImageCompositeMasked, or JoinImageWithAlpha → SaveWEBM for an alpha WebM.

Testing locally

/Users/rob/Documents/ComfyUI/.venv/bin/python tests/smoke.py

Writes one PNG per style to tests/out/ and exercises both nodes end-to-end. The repo is symlinked into the local install's custom_nodes (/Users/rob/Documents/ComfyUI/custom_nodes/ — the server launches with --base-directory /Users/rob/Documents/ComfyUI, so that's the only dir it scans; server on port 8000) — restart ComfyUI to pick up code changes.

No extra dependencies: numpy, torch, and Pillow all ship with ComfyUI.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages