Rhythm Generator
A beat-synced trigger that gives your video an actual pulse
- AUDIO
Rhythm Generator is the audio side of the ComfyUI-Rhythm-Tracks pack: you give it a BPM and a wav sample, and it outputs an AUDIO clip with that sample triggered on every beat. Monophonic playback - each beat cuts the previous sample dead, exactly like a one-voice drum machine. You get a clean, surgical kick/click track instead of a muddy pile-up.
Why generate audio in a video-tooling pack at all? Two reasons, and both are legit. First, a reference beat is genuinely useful when you're syncing visuals: detect the tempo of a song with BPM Detector, hand it to this node, and you've got a click track that is the rhythm your motion is locked to - a sanity check you can actually listen to. Second, and this is the interesting one for anyone in the LTX-2 world: audio-conditioned video is a native thing there, and music-video generation is where LTX found its footing. A clean beat-accurate kick track is exactly the kind of input those audio-conditioned workflows want. The pack author's framing says it all - this whole ecosystem is BPM-synced motion control, and audio is how you anchor it.
How it works
Short and mechanical. The node loads the wav from the pack's audio/ directory, computes the beat period in samples (60 / bpm × sample_rate), and lays the sample down at delay + n × beat_period for as many beats as fit in length. Because playback is monophonic, each trigger is truncated to the beat period - so a sample that's longer than a beat simply gets cut off at the next one. Negative delay values push the first beat earlier, and the code even absorbs the pre-zero portion as a source offset, so an early beat starts mid-sample instead of vanishing. Output is a standard ComfyUI AUDIO dict: waveform plus sample_rate, and the rate is whatever your source wav happens to be.
The inputs that matter
- bpm - the tempo. One beat = one sample trigger, per the tooltip.
- wav - a dropdown of
.wavfiles found in the package'saudio/directory at startup. The pack ships exactly one:kick.wav. - length - output duration in seconds.
- delay - time offset for the first beat, in seconds. Negative = earlier, positive = later.
One output, AUDIO, ready to wire into any audio sink - a save node, a preview, or an audio-conditioned video model.
Where it bites
- You only get one sample. The shipped
audio/folder has justkick.wav. To add your own, drop wavs into<ComfyUI>/custom_nodes/ComfyUI-Rhythm-Tracks/audio/and restart ComfyUI - the dropdown is scanned at load time, so it won't refresh mid-session. - Monophonic means short samples. Because every beat chops the previous one, a long crash cymbal or a ringing tail just gets amputated at the next trigger. That's the design, not a bug. Use kicks, hats, short plucks - attack-y samples that want to be retriggered.
- Output sample rate follows the source wav. If your downstream model expects 48kHz and your sample is 44.1k, resample the wav file first rather than hoping the node will fix it.
Install
ComfyUI Manager (search "ComfyUI-Rhythm-Tracks") or:
cd ComfyUI/custom_nodes
git clone https://github.com/grmchn/ComfyUI-Rhythm-Tracks
cd ComfyUI-Rhythm-Tracks
pip install -r requirements.txt
Dependencies are just librosa and torchaudio; no models, no downloads, nothing heavy. The one catch that applies to every node in this pack: it's built on ComfyUI's newer Node SDK (comfy_api.latest), so an outdated ComfyUI won't load it - update ComfyUI before troubleshooting anything else. It's a small hobbyist pack from grmchn (GPL-3.0), and for a node this focused, the worst failure mode is a wrong BPM on your end, not a broken node.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| bpm | FLOAT | 140.030–300 | Tempo in beats per minute. One beat = one sample trigger. |
| wav | COMBO | kick.wav | Wav sample file in the package's audio/ directory. |
| length | FLOAT | 5.00.1–60 | Output duration in seconds. |
| delay | FLOAT | 0.00-10–10 | Time offset in seconds for the first beat. Negative = earlier, positive = later. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |