(deforum) Frequency Range Amplitude
Isolate the Kick Drum, Then Drive the Zoom From It
- audio
- frequency_range
- frequency_range_amplitude
The classic audio-reactive move is simple: pick the part of the mix you care about, and let only that drive the animation. (deforum) Frequency Range Amplitude is the node that does the picking. Give it audio and a frequency band - say 20–120 Hz for a kick drum - and it bandpass-filters out everything else, so your zoom pulses on the beat instead of being yanked around by whatever's loudest in the whole track.
It's part of the Deforum Nodes pack, XmYx's ComfyUI port of the animation engine that powered A1111's Deforum extension (documented in the KB's ui-history essay as arriving October 2022). The audio nodes here sit on top of the pack's deforum-studio backend and expect the pack's AUDIO type, produced by the load-audio side of the ecosystem - the README's recommended-companions list points at ComfyUI-AudioScheduler for that job.
How it works
Under the hood it's a textbook signal chain:
- Take the (mono-mixed) audio and run it through a 5th-order Butterworth bandpass filter with
filtfilt- that's thefrequency_rangetuple of low/high cut. - Run an FFT on the filtered result and take the magnitude.
- "Normalize and smooth" the result, optionally inverted.
That last step is where you need the honest caveat: as the code ships today, the normalize() method is an empty pass stub. The bandpass and FFT run, then the node returns whatever the stub gives back - which is None, not a usable amplitude. So while the filtering logic is real and readable, this specific node is unfinished in the current release. If you're building a workflow today, the neighboring nodes (Beat Detection, ExtractDominantNoteAmplitude, Time Smoothing) are the ones that actually hand you a live AMPLITUDE series. This one is "watch this space," not "build on this."
The inputs, when it works
- audio (AUDIO) - required.
- frequency_range (TUPLE, default 20–20000) - the band. Kick = 20–120, snare/mid = 200–2000, vocals = 300–3000.
- window_size (INT, default 1) - meant to smooth over N frames; also stubbed.
- inverted (BOOLEAN, default false) - meant to flip the curve so loud = no motion and quiet = motion, a trick for "calm on the beat, wild between" looks.
The single output is frequency_range_amplitude (AMPLITUDE), designed to feed the pack's amplitude-to-schedule nodes.
Installing it
Same pack as the rest:
cd ComfyUI/custom_nodes
git clone https://github.com/XmYx/deforum-comfy-nodes.git
Restart, or use Manager → "Deforum Nodes" by XmYx. It's a heavy install - deforum-studio from git plus librosa, moviepy, av, pydub, opencv-contrib and a numpy<2.0.0 pin - and the README demands Python 3.10. No audio example workflows ship in the pack, so the Discord is the main place these get actually used.
Common issues
Beyond the stub, the usual suspects apply: the bandpass filter needs a sane band - a range wider than the Nyquist limit or a lowcut above the highcut just produces garbage or an exception. And if the whole pack fails to load on install, check for an orphaned A1111 deforum package (pip uninstall deforum, then retry). But the thing to remember with this node specifically is that it's a work in progress, and the fix isn't in your workflow - it's in the pack.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| frequency_rangeopt | TUPLE | 20,20000 | — |
| window_sizeopt | INT | 1 | — |
| invertedopt | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| frequency_range_amplitude | AMPLITUDE | — |