Nodes/ComfyUI_Fill-Nodes/FL Audio BPM Analyzer
ComfyUI Node

FL Audio BPM Analyzer

FL_Audio_BPM_Analyzer — detect tempo and beat positions for audio-reactive video

By filliptm·Created 3 years ago·Updated a day ago· 630
FL Audio BPM Analyzer
  • audio
  • audio
  • bpm
  • beat_positions
  • visualization
bpm_methodbeat_intervals
half_timefalse
beat_offset_ms0

If you're making anything that moves to music - a beat-synced slideshow, cuts that land on the downbeat, effects that pulse with the kick - you need to know where the beats are. This node figures that out. Hand it an audio track and it detects the tempo (BPM) and the exact positions of every beat, then hands those positions downstream so the rest of your video reacts to them.

It's the foundation node for the whole audio-reactive corner of Fill-Nodes. The pack has a shelf of nodes that take beat positions and do something with them - beat visualizers, a music-video sequencer, segment extractors, ADSR envelope generators for drum hits - and almost all of them start here, with the beat map this node produces.

How it works

Under the hood it's librosa, the standard Python audio-analysis library, doing onset detection and tempo estimation. It listens for the rhythmic pulse in the track, estimates BPM, and locates each beat in time. It also fills in beats to cover the whole duration, so you get an even grid rather than a map that stops when the analysis got unsure. The beat positions come out as a JSON string that the downstream Fill audio nodes know how to read.

The inputs and outputs

  • audio (AUDIO) - the track to analyze. That's the only required input.
  • bpm_method - beat_intervals or onset_strength. Two different ways to estimate tempo; if one gives you a number that feels wrong, try the other.
  • half_time - if the detector locks onto double-time (reads 160 BPM on an 80 BPM track), flip this to halve it.
  • beat_offset_ms (−1000 to 1000) - nudge every beat earlier or later to fine-tune alignment against your visuals.

Outputs: audio (passed through, so you can chain it), bpm (a float), beat_positions (the JSON string the other audio nodes consume), and visualization (an image showing the waveform with beat marks - handy for eyeballing whether the detection is sane).

How to install it

Part of filliptm's Fill-Nodes pack. ComfyUI Manager → search ComfyUI_Fill-Nodes → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
pip install -r ComfyUI_Fill-Nodes/requirements.txt

This node needs librosa, which the pack's requirements.txt installs. Librosa is a heavier audio dependency (it pulls in numba and friends), so if the pack install fails, the audio libraries are a likely culprit - see below.

Common issues & troubleshooting

The BPM is exactly double or half what it should be. This is the classic tempo-detection failure, not a bug in this node - beat trackers routinely lock onto the wrong metrical level. That's precisely what half_time and the two bpm_method options exist for. Toggle half_time, or switch methods, and check the bpm output against a track you know the tempo of.

Beats drift out of sync with the visuals. Use beat_offset_ms to slide the whole grid. A small negative offset often helps because visual cuts feel "late" if they land exactly on the beat rather than a hair before it.

It works great on a four-on-the-floor track and badly on orchestral. Clean, loud, steady kicks (electronic, hip-hop, pop) detect beautifully. Rubato, swing, sparse or acoustic material with a soft pulse is genuinely hard for any beat tracker - check the visualization output and expect to hand-correct with the offset.

Install failed on the audio libs. librosa and its numba dependency are the usual sore spot in a big pack like this. If the requirements install chokes, install librosa on its own into your ComfyUI Python environment and retry.

Category🏵️Fill Nodes/Audio

Inputs (4)

NameTypeDefaultDescription
audioAUDIO
bpm_methodoptCOMBObeat_intervals2 options: beat_intervals, onset_strength
half_timeoptBOOLEANfalse
beat_offset_msoptINT0-1000–1000

Outputs (4)

NameTypeDescription
audioAUDIO
bpmFLOAT
beat_positionsSTRING
visualizationIMAGE