Beat Wave Feature Extractor β‘π ‘π π £π
Turn a song's beat into an LFO you can drive anything with
- audio
- feature
- frame_count
This is the node behind a lot of the "everything pulses to the beat" look you see in audio-reactive ComfyUI clips. Rather than pulling a raw amplitude curve out of your audio, it locks onto the beat and generates a clean, shaped waveform - sine, square, sawtooth, whatever - synced to that rhythm. Think of it as a synth LFO that tunes itself to your song instead of running at a fixed rate you have to guess.
This whole reactive-audio-to-visual pipeline is a real, if niche, corner of the ComfyUI ecosystem - the community's other well-known example is Yvann's audio-reactive node set, which separates stems and drives keyframe transitions, ControlNet strength, and motion amount from the resulting weights. RyanOnTheInside's FEATURE system (this node is one of several "Sources" that produce a FEATURE) is built for the same job: a driveable numeric signal you can plug into other nodes' parameters instead of a fixed value.
How it works
It analyzes the audio input to find the beat, then generates a periodic waveform locked to that beat grid using whichever shape you pick in extraction_method. beat_divisor subdivides or multiplies the beat rate you're syncing to (a value of 2 fires twice as often, a negative value slows it to once every couple of beats), time_signature tells it how many beats make up a bar for anything that needs bar-level shaping, phase offsets where in the cycle the wave starts, and duty_cycle controls the on/off ratio for the square wave shape specifically. The result comes out as a per-frame FEATURE curve at your chosen frame_rate, ready to drive another node's parameter.
The inputs and outputs that matter
audio(AUDIO, required) - the track to extract the beat from.extraction_method- the waveform shape:sine,sawtooth,triangle,square,exponential_decay, orramp.beat_divisor(default 1, range -8 to 16) - subdivide or multiply the detected beat rate.phase(default 0, range 0β1) andduty_cycle(default 0.5, range 0.01β0.99) - standard oscillator controls: where the cycle starts, and (forsquare) how much of each cycle is "on."time_signature(default 4, range 1β12) - beats per bar, for anything shape-wise that resets on the bar.frame_rate,frame_count,width,height- the usual Feature-source plumbing: output frame rate, how many frames to generate (0 typically means derive it from the audio length), and dimensions carried along for compatibility with the rest of the Feature pipeline.
Outputs: a FEATURE (the wave itself) and an INT (frame_count, useful for wiring the same length into other nodes downstream).
How to install it
Via ComfyUI Manager: search "RyanOnTheInside," install, restart. By hand:
cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside.git
cd ComfyUI_RyanOnTheInside
pip install -r requirements.txt
then restart. Audio processing here leans on the requirements.txt's scipy/scikit-image stack rather than a downloaded model, so there's no weight file to fetch for this specific node.
Common issues & troubleshooting
The wave doesn't line up with the actual beat. Beat detection on messy or heavily processed mixes isn't perfect - if the sync feels off, try beat_divisor at 1 first to confirm baseline detection before layering subdivisions on top, and sanity-check on a track with a very clear, steady beat if you're unsure whether it's your settings or the detector struggling with the source.
Output feels choppy or stepped. Check frame_rate matches what the rest of your pipeline is actually running at - a mismatch here means the wave gets sampled at the wrong granularity relative to your video frames.
Square wave doesn't look like a clean 50/50 pulse. That's duty_cycle - it defaults to 0.5 but is very easy to nudge accidentally; reset it if the on/off ratio looks skewed.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| extraction_method | COMBO | 6 options: sine, sawtooth, triangle, square, exponential_decay, ramp | |
| frame_rate | FLOAT | 30.01β120 | β |
| frame_count | INT | 0 | β |
| width | INT | 51264β4096 | β |
| height | INT | 51264β4096 | β |
| audio | AUDIO | β | |
| beat_divisor | INT | 1-8β16 | β |
| phase | FLOAT | 0.000β1 | β |
| duty_cycle | FLOAT | 0.500.01β0.99 | β |
| time_signature | INT | 41β12 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| feature | FEATURE | β |
| frame_count | INT | β |