Nodes/ComfyUI-AudioReactive/Bandpass (Audio Op)
ComfyUI Node

Bandpass (Audio Op)

Bandpass — a Butterworth filter that's not wired up yet (read this first)

By dmarx·Created 3 years ago·Updated 2 years ago· 11
Bandpass (Audio Op)
  • signal
  • SIGNAL

OpBandpass (display name "Bandpass (Audio Op)") is supposed to band-pass filter a SIGNAL - keep the frequencies between a low and high cutoff, kill everything else - using a Butterworth filter. That's a genuinely useful tool for audio-reactive work: filter the mix down to "the kick's frequencies" or "the hi-hat's frequencies" and drive different animation parameters off different bands, instead of everything reacting to everything.

Here's the honest part: the node doesn't actually work yet. This is one of the pack's parameterized operators, and the wiring wasn't finished in the port.

What's actually going on in the source

The operator's backend is a real, correct Butterworth band-pass implementation (butter/sosfilt from SciPy, 10th order, copied from the pytti-tools codebase - dmarx credited that lineage in the original notebook). But look at how the node wrapper calls it. The backend is written as a factory:

def bandpass(low: float, high: float):
    return partial(butter_bandpass_filter, lowcut=low, highcut=high)

It's meant to be called with two cutoff frequencies and to hand back a ready-to-use filter. The node wrapper, though, calls every operator as f(y, sr) - so it calls bandpass(y, sr) with the signal as the first argument and the sample rate as the second. That doesn't produce a filtered signal. It produces a functools.partial object sitting where the audio data should be. The node "runs" without error and the whole pack's SIGNAL machinery happily passes that function object downstream - where ARDrawSignal or any real math will throw a TypeError.

The info_schema confirms the intent was half-finished: the node exposes only a signal input. There's no lowcut/highcut input at all, so even a willing user can't supply the cutoffs. This is a stub awaiting a proper input-wiring pass.

So what should you do?

  • Don't build a workflow around it. If you load someone's workflow that contains "Bandpass (Audio Op)", expect it to fail downstream, and swap it for a working filter.
  • Need band-splitting today? Do it in the frequency domain yourself, or wait - the backend is real, so this is likely to get wired up eventually. Watch the repo.
  • Alternative that works right now: the pack's Harmonic / Percussive split is a poor man's band separation that is functional, and Rms on different tracks' files (or on harmonic vs. percussive layers) gets you band-ish separation without a filter.

Inputs and outputs

As shipped, the interface is just:

  • signal (SIGNAL) - in.
  • SIGNAL - out, but containing a Python function object rather than filtered audio. Do not trust it.

Installing it

Same as the rest of the pack - Manager (search "AudioReactive") or:

cd ComfyUI/custom_nodes
git clone https://github.com/dmarx/ComfyUI-AudioReactive

Restart; first load auto-installs scipy, scikit-learn, librosa, loguru (scipy is what Butterworth actually needs here, and librosa drags in numba). If the pack won't load with ModuleNotFoundError: No module named 'keyframed', pip install keyframed.

The takeaway

This is a pack still mid-port from a notebook, and Bandpass is one of the unfinished bits. Read the source (nodes/audio_utils.py) before you trust any node name in here - the same pattern (backend real, wrapper stubbed) hits Clamp, Modulo, Pow, Quantize, Smooth, and Sustain too.

CategoryAudioReactive/Operators

Inputs (1)

NameTypeDefaultDescription
signalSIGNAL

Outputs (1)

NameTypeDescription
SIGNALSIGNAL