Audio Beat Detect π₯
Timestamps, BPM, and the Foundation of Audio-Reactive Video
- audio_samples
- beat_times
- beat_count
- bpm
- summary
If you've ever watched a music video where cuts, flashes, or camera moves land exactly on the beat, the trick isn't magic - someone extracted beat timestamps from the audio and drove their edits off them. Audio Beat Detect is that extraction, as a ComfyUI node. Feed it an AUDIO signal and it returns the beat timestamps, how many beats it found, and an estimated BPM. It's the front door to audio-reactive video in the OmniNodes pack, because pretty much everything downstream wants to know where the beats are.
How it works
The mechanism is energy-based onset detection - no ML, no model downloads, just signal processing. It slices the audio into ~10ms frames, computes the energy of each frame, and compares it to a local average over a roughly 430ms window. Any frame whose energy spikes significantly above that local average is flagged as an onset. sensitivity controls how big a spike counts: 1.5 is the default, and you'll crank it down to catch quieter hits or up to ignore noise. Then it merges onsets that fall closer together than your max_bpm allows, and estimates BPM from the median gap between the surviving beats.
That last part matters for the workflow: min_bpm and max_bpm are your guardrails. Set them wrong and a slow track gets half-tempo beats detected, or a fast one gets aliased down to a fraction. For most pop/EDM, the default 60β200 range is fine.
The outputs and what to do with them
beat_times- a STRING of comma-separated timestamps in seconds. This is the raw data; feed it into a script, or a node that accepts timestamps, to trigger frame-accurate cuts.beat_count- INT, how many beats it found. Handy for "N beats, so I need N segments" math.bpm- FLOAT, the estimated tempo. Wire it into a display node, or use it to drive a speed value.summary- STRING, a human-readable rundown (beats, BPM, duration, sensitivity) for logging.
The pack's own framing is that it "can drive frame-sync video effects by pairing with video nodes" - and the companion Audio-to-Latent Modulator takes a different approach (a continuous envelope instead of discrete beats), so you've got both a "where are the hits" and a "how loud is it right now" view of the same audio. For beat-synced cuts, this is the one you want.
Install and gotchas
ComfyUI Manager β search OmniNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TensorVizion/OmniNodes
Restart ComfyUI; it's under TensorVizion/Audio. Pure NumPy/PyTorch, no extra installs.
Two honest caveats. First, this is onset detection, not transcription - it's great for tempo and hit locations on music, and rough on speech or ambient audio with no clear rhythmic hits. Second, the beat times come out as a comma-separated string, not a native list type, so a downstream node has to parse it - check that whatever you're feeding it accepts a string of timestamps before you build the whole graph around it. For its actual job - "where are the beats, how fast is the track" - it's fast, dependency-free, and does what it says.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| audio_samples | AUDIO | β | |
| sample_rate | INT | 441008000β192000 | β |
| sensitivity | FLOAT | 1.50.5β5 | β |
| min_bpm | INT | 6020β200 | β |
| max_bpm | INT | 20040β300 | β |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| beat_times | STRING | β |
| beat_count | INT | β |
| bpm | FLOAT | β |
| summary | STRING | β |