Nodes/ComfyUI Web Viewer/AUDIO BPM Detector (Experimental) @ vrch.ai
ComfyUI Node

AUDIO BPM Detector (Experimental) @ vrch.ai

Let the music set the pace of your generation

By VrchStudio·Created 2 years ago·Updated 18 days ago· 356
AUDIO BPM Detector (Experimental) @ vrch.ai
  • raw_data
  • BPM_DATA
  • BPM_VALUE
  • BPM_CONFIDENCE
  • BEAT_DETECTED
  • RHYTHM_STRENGTH
sample_rate48000
analysis_window4.0
update_interval0.2
confidence_threshold0.30
bpm_range_min60
bpm_range_max200
debugfalse

The AUDIO BPM Detector (Experimental) @ vrch.ai reads the beat. Feed it audio analysis data and it estimates the tempo in beats per minute, then hands you the BPM as a number plus a BEAT_DETECTED flag that fires when a beat lands. In a music-reactive workflow that's gold: instead of your visuals vaguely pulsing with loudness, they can snap to the actual rhythm - frame changes on the beat, parameters jump on the downbeat.

The "(Experimental)" label is doing honest work here. Beat detection from raw audio is a genuinely hard signal-processing problem, and this node is best treated as "good enough to be fun," not "studio-grade tempo analysis." The dials exist because you will be tuning it to whatever music you throw at it.

How it works

It takes raw_data (the JSON from a Microphone Loader or compatible source) plus a sample_rate (16k/24k/48k - match your source), and maintains a rolling analysis over analysis_window seconds (1–10, default 4). update_interval controls how often it re-checks. The bpm_range_min / bpm_range_max bounds (default 60–200) tell it where to look, and confidence_threshold (0–1, default 0.3) gates how sure it must be before it reports a beat - drop it if beats are being missed, raise it if it's hallucinating.

Outputs:

  • BPM_VALUE (FLOAT) - the estimated tempo.
  • BPM_CONFIDENCE (FLOAT) - how sure the estimate is.
  • BEAT_DETECTED (BOOLEAN) - fires on each detected beat; this is the rhythm clock you branch on.
  • RHYTHM_STRENGTH (FLOAT) - how strong/regular the beat feels, a nice "danceability" signal.
  • BPM_DATA (JSON) - the full analysis for anything that wants more.

Installing it

Standard pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/VrchStudio/comfyui-web-viewer
pip install -r comfyui-web-viewer/requirements.txt

Or install "ComfyUI Web Viewer" from ComfyUI Manager and restart. No models to download.

Practical tuning notes

  • Sample rate mismatch breaks it. Keep the detector on the same rate as whatever feeds it, or the timing math is off and beats arrive at odd offsets.
  • Narrow the BPM range. If you know the track is 120–140, set bpm_range_min/max to that and detection gets far more stable. The wide default is a compromise for unknown music.
  • It's a rolling estimate, so give it a couple of bars before judging. The first analysis_window seconds are the warm-up; don't tune on the first beat.

The classic chain: Mic Loader → BPM Detector → Web Viewer, with BEAT_DETECTED feeding a strength or scale parameter so your output pulses with the track. For a visual of the beat itself, run the detector alongside the Audio Visualizer and you'll see the waveform in sync with the flags.

Categoryvrch.ai/audio

Inputs (8)

NameTypeDefaultDescription
raw_dataJSON
sample_rateCOMBO480003 options: 16000, 24000, 48000
analysis_windowFLOAT4.01–10
update_intervalFLOAT0.20.1–2
confidence_thresholdFLOAT0.300–1
bpm_range_minINT6030–200
bpm_range_maxINT20060–300
debugBOOLEANfalse

Outputs (5)

NameTypeDescription
BPM_DATAJSON
BPM_VALUEFLOAT
BPM_CONFIDENCEFLOAT
BEAT_DETECTEDBOOLEAN
RHYTHM_STRENGTHFLOAT