Nodes/RyanOnTheInside/Rhythm Feature Extractor βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Rhythm Feature Extractor βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Turn beats and tempo into a reactive signal

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Rhythm Feature Extractor βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • audio
  • FEATURE
β—„extraction_methodβ–Ύβ–Ί
β—„frame_rate30.0β–Ί
β—„frame_count0β–Ί
β—„width512β–Ί
β—„height512β–Ί
β—„time_signature4β–Ί

AudioFeatureExtractor has an onset_strength method for catching individual hits, but if what you actually want is beat-synced - an effect that lands on the downbeat, or a pulse that tracks tempo - this is the more purpose-built node for it. It analyzes the rhythmic structure of a track rather than just its raw loudness or brightness, and turns that into a FEATURE you can wire into any of the pack's reactive targets.

The eight extraction methods

extraction_method covers a genuinely wide range of rhythmic information, and the author's own tooltip descriptions make clear when to reach for each: beat_locations marks exact beat timings - the choice for precise beat-synced effects. tempo gives overall speed, for effects that should scale with how fast or slow the track is rather than react per-beat. onset_strength captures how strong each beat hits, good for impact effects. beat_emphasis highlights stronger beats specifically, useful for accenting the main hits without reacting to every minor one. syncopation detects off-beat rhythms - a more advanced, textural choice for complex or unusual rhythmic material. rhythm_regularity measures how steady the beat is, a stability signal rather than an impact one. down_beats marks the first beat of each measure (strong emphasis), while up_beats marks the others (lighter emphasis) - a genuine distinction if your effect should feel different on beat one versus the rest.

time_signature (default 4, for common 4/4 time) is what makes the down-beat/up-beat distinction actually correct - it tells the node how many beats make up a measure, so it knows which beat is "the one."

Like the pack's other audio extractors, frame_count at 0 auto-calculates from the audio's length and frame_rate; set it explicitly and the extracted feature gets interpolated to that target length instead.

The inputs and outputs that matter

  • audio (required, AUDIO) - the source.
  • extraction_method - one of the eight rhythmic measures above.
  • time_signature (default 4) - beats per measure; critical for down_beats/up_beats to be meaningful.
  • frame_rate, frame_count (default 0, auto) - how the rhythm timeline maps onto video frames.
  • width/height - sizes the internal feature tensor; match your pipeline's resolution.

Output is a single FEATURE - wire it into any Flex target's reactive input, or FeatureToMask if you just want the rhythm as a plain mask.

How to install it

ComfyUI Manager: search "RyanOnTheInside", install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt

then restart. Audio analysis dependencies come in via requirements.txt with the rest of the pack - no separate model download for this node.

Common issues & troubleshooting

Downbeats land on the wrong beat. This is almost always time_signature mismatched to your actual track - a waltz in 3/4 analyzed with time_signature left at the default 4 will misidentify which beat is the downbeat throughout. Set it to match the actual meter of your source.

Feature looks flat on a track with an obvious beat. Try a different extraction_method before assuming the analysis failed - syncopation and rhythm_regularity in particular are subtler, texture-level measures that can read as nearly flat on very straightforward, four-on-the-floor material, while onset_strength or beat_locations on the same audio would show clear activity.

Tempo detection seems off on a track with tempo changes. tempo extraction assumes a reasonably steady pulse to lock onto - a track with significant tempo drift or rubato (a live, unquantized performance, for instance) can confuse it. beat_locations tends to hold up better than tempo on that kind of material since it tracks individual hits rather than inferring one global speed.

CategoryRyanOnTheInside/FlexFeatures/Sources/Audio

Inputs (7)

NameTypeDefaultDescription
extraction_methodCOMBOChoose how to analyze the rhythm: - beat_locations: Marks exact beat timings - perfect for precise beat-synced effects - tempo: Overall speed of the music - use for speed-based animations - onset_strength: How strong each beat is - great for impact-based effects - beat_emphasis: Highlights stronger beats - good for accenting main beats - syncopation: Detects off-beat rhythms - interesting for complex animations - rhythm_regularity: How steady the rhythm is - use for stability-based effects - down_beats: Marks main beats (1st beat) - strong rhythmic emphasis - up_beats: Marks other beats - lighter rhythmic emphasis
frame_rateFLOAT30.01–120Frame rate of the video (1.0 to 120.0 fps)
frame_countINT0Number of frames to generate (default of 0 will automatically calculate frames from audio length and frame rate). When set to 0, automatically calculates frames from audio length and frame rate. When specified, interpolates feature to match the target frame count.
widthINT51264–4096Width of the output feature (64 to 4096)
heightINT51264–4096Height of the output feature (64 to 4096)
audioAUDIOInput audio to analyze
time_signatureINT41–12Number of beats per measure (e.g., 4 for 4/4 time)

Outputs (1)

NameTypeDescription
FEATUREFEATUREβ€”