Nodes/ComfyUI_Fill-Nodes/FL Audio Drum Detector
ComfyUI Node

FL Audio Drum Detector

Kicks, snares, and hi-hats from a waveform

By filliptm·Created 3 years ago·Updated a day ago· 630
FL Audio Drum Detector
  • audio
  • drum_times_json
kick_sensitivity0.50
snare_sensitivity0.50
hihat_sensitivity0.50

If you want your visuals to react to specific drum hits - not just "loudness in general" but "that was a kick, that was a hi-hat" - you need onset detection that's aware of which frequency band each drum type actually lives in. FL_Audio_Drum_Detector does exactly that: it runs librosa onset detection with per-drum frequency-band analysis and hands back a timestamp list for kicks, snares, and hi-hats separately.

How it works

This is classic DSP, not machine learning, and that's a feature - it's fast, deterministic, and doesn't need a model download. Per the pack's own band definitions: kicks are detected in the 30–300Hz range, snares combine the 150–400Hz body with 4–10kHz noise/snap content, and hi-hats live at 6kHz and above. Because it's frequency-band-based rather than learned, it's reliable on typical mixes but genuinely "dumb" about unusual ones - a mix where your kick has heavy top-end (some trap-style 808s) or your snare is unusually thin can need sensitivity retuning to behave the way a musician would expect.

The inputs and outputs that matter

Required: audio - a native ComfyUI AUDIO input, typically from a Load Audio node.

Optional: kick_sensitivity, snare_sensitivity, hihat_sensitivity (each 0–1, default 0.5) - raise the relevant one to catch quieter or softer hits of that type, lower it to reject false positives from bleed between bands.

Output: drum_times_json - a single JSON string with onset timestamps per drum type. This is the direct input to FL_Audio_Reactive_Envelope downstream, which turns these instant hit-times into smooth ADSR curves you can actually drive brightness, saturation, speed, or glow effects with.

How to install it

ComfyUI Manager: search ComfyUI_Fill-Nodes, install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes

then restart. The dependency that actually matters here is librosa - it's a heavier install than most of this pack's nodes, pulling in numba/llvmlite for JIT-compiled DSP, and the first analysis after a fresh install can run noticeably slower while numba compiles and caches. If this specific node fails to import while the rest of Fill-Nodes loads fine, check pip show librosa and reinstall it directly rather than reinstalling the whole pack.

Common issues & troubleshooting

Missed hits. Raise the relevant sensitivity first - the defaults (0.5 across the board) are a starting point tuned for a fairly typical mix, not a universal setting.

False positives, especially on hi-hats. The 6kHz+ hi-hat band is the most bleed-prone: cymbal crashes, vocal sibilance, and snare overtones can all live up there. Lower hihat_sensitivity if you're getting spurious hits that don't correspond to actual hi-hat hits.

Detection looks fine on a click track but wrong on the real mix. That's expected - this is band-based detection tuned against typical drum mixing conventions, not a source-separated stem. If your mix has unusual instrumentation sharing those frequency bands (a bassline sitting in kick territory, a synth lead in hi-hat territory), consider running Fill-Nodes' Demucs-based stem separator first and detecting drums off the isolated drum stem instead of the full mix.

Category🏵️Fill Nodes/Audio

Inputs (4)

NameTypeDefaultDescription
audioAUDIO
kick_sensitivityoptFLOAT0.500–1
snare_sensitivityoptFLOAT0.500–1
hihat_sensitivityoptFLOAT0.500–1

Outputs (1)

NameTypeDescription
drum_times_jsonSTRING