ComfyUI Node

SCAIL Beat Detect

Find the beats, downbeats and tempo your dancer is going to hit

By ckinpdx·Created 9 months ago·Updated 8 months ago· 17
SCAIL Beat Detect
  • audio
  • beat_info
frame_count81
fps24

Rhythm is the backbone of this whole pack: moves fire on beats, anticipation kicks in just before them, and phrase boundaries change the choreography. SCAILBeatDetector is the node that finds those beats. Feed it audio and it hands back a SCAIL_BEAT_INFO structure - beat frames, downbeats, tempo, an onset envelope and an energy curve - which is the required rhythm input for SCAILBeatDrivenPose and SCAILAISTBeatDance. No beats, no reactive dance.

How it works

It's librosa under the hood, doing its standard thing:

  • librosa.beat.beat_track estimates tempo and finds beat frames, converted from audio time into your frame timeline (frame_count at fps).
  • Downbeats are taken as every fourth beat - the "1" of each bar - which is what the choreographer uses for phrase changes.
  • onset_strength gives a per-frame onset envelope, normalized 0–1, so the nodes know how strong each transient is, not just that one exists.
  • RMS energy is resampled to a per-frame curve, also normalized.

Both the envelope and energy curves come out as torch tensors inside the structure, alongside the plain beat frame indices. It prints a quick summary ([SCAIL] Beats: N, Tempo: X BPM) so you can sanity-check the analysis in the console without digging into tensors.

The inputs that matter

  • audio - an AUDIO input (ComfyUI LoadAudio, VHS_LoadAudioUpload, whatever you're using).
  • frame_count and fps - must match your target video, exactly like SCAILAudioFeatureExtractor. Beat positions are converted to frame indices using these; get them wrong and every beat lands on the wrong frame. 81/24 is the default, but if your video is 125 frames at 16fps, set it to that.

This is the node that pairs with SCAILAudioFeatureExtractor in every reactive workflow: the feature extractor measures how hard each moment hits, the beat detector says when the hits are. Run both off the same audio with the same frame_count and fps, and the choreographer has everything it needs.

Output and install

One output, beat_info (type SCAIL_BEAT_INFO), feeding SCAILBeatDrivenPose and SCAILAISTBeatDance. It's also an optional input on SCAILAISTFullSequence, where it aligns the start of a full routine to your downbeat instead of letting it land wherever.

Install is the pack's shared routine: clone ckinpdx/ComfyUI-SCAIL-AudioReactive into ComfyUI/custom_nodes, pip install -r requirements.txt, restart. Librosa is in the requirements, so the heavy lifting comes with the pack. No downloads, no keys - a few seconds of CPU per clip, and it's the rare node you can rerun freely while tuning.

CategorySCAIL-AudioReactive

Inputs (3)

NameTypeDefaultDescription
audioAUDIOAudio input for beat analysis
frame_countINT811–10000Number of frames. Should match your video length.
fpsINT241–120Frames per second. Match your target video FPS.

Outputs (1)

NameTypeDescription
beat_infoSCAIL_BEAT_INFO