π Spectrum Analyzer
The Node That Finally Tells You What Your Noise Actually Sounds Like
- audio
- audio
- spectrum_report
- peak_frequency
- spectral_centroid
- spectral_energy
You're dialing in a noise wall and you have no idea what frequencies are actually coming out. That's the problem this node solves. SpectrumAnalyzer is the most-searched node in the NoiseGen pack, and for good reason - it's the one that shows you what's really happening instead of leaving you guessing.
What it does
It runs an FFT over your audio, frame by frame, and hands you back three things at once: the audio (optionally noise-gated), a text report of the spectrum, and raw numbers - peak frequency, spectral centroid, and spectral energy - you can feed into other nodes. Think of it as a scope for your audio chain. You drop it between, say, a HarshFilter and your AudioSave, and suddenly "why does this sound muddy" becomes answerable.
How it works
The mechanism is a windowed STFT, the same thing every spectrum analyzer does. Your audio gets chopped into overlapping frames of fft_size (512 to 8192 samples), each shaped by window_type (hann by default), and the overlap between frames is set by overlap_factor. The FFT of each frame becomes the spectrum, which you can view as magnitude, power, log, mel, or bark across a frequency_scale, cropped to your frequency_range_low/high. smoothing_factor averages consecutive frames so the numbers don't jitter, and peak_tracking keeps a lock on the loudest bin.
The interesting part is the spectral gate. Flip spectral_gate on and set gate_threshold (default β60 dB) and any bins below that level get silenced - so the audio output becomes a de-hissed, noise-gated version of your input. That turns this from a pure meter into a denoiser. Two nodes for the price of one.
The inputs and outputs that matter
You'll set three things: fft_size (2048 is a fine default for music-range material), display_mode, and spectral_gate if you want gating. Everything else has sensible defaults.
The outputs are where it gets useful:
audio- pass-through (or gated) audio, so the node can sit inlinespectrum_report- a STRING with the frequency breakdown; wire it into a text-display nodepeak_frequency,spectral_centroid,spectral_energy- FLOATs you can show on screen or use as control signals
save_spectrum exists if you want the analysis written out, but for most workflows the live report is enough.
Install
The whole pack installs the same way:
cd ComfyUI/custom_nodes
git clone https://github.com/eg0pr0xy/comfyui_noisegen.git
cd comfyui_noisegen
pip install -r requirements.txt
On Windows with the embedded Python that's ComfyUI\python_embeded\python.exe -m pip install -r requirements.txt. ComfyUI Manager can also grab it - search "NoiseGen" or the author eg0pr0xy. No model files, no API keys, nothing to download beyond the code itself. Then restart ComfyUI.
Gotchas
Don't skip the pip install step - this pack imports scipy and soundfile at load time, and a stock ComfyUI doesn't ship those. Skip it and the whole pack fails to register, not just this node. And one thing the README glosses over: it references a ./web directory for visualization that doesn't exist in the repo, so don't expect a fancy in-graph plot - the real-time picture is the report string and the FLOAT outputs, not a rendered spectrogram. That's a mild disappointment, but the numbers are honest.
The pack is small and largely untalked-about on the usual channels, which means you're mostly on your own - but this node is simple enough that you won't need a support group.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | Input audio for spectrum analysis | |
| fft_size | COMBO | 2048 | 5 options: 512, 1024, 2048, 4096, 8192 |
| overlap_factor | FLOAT | 0.750β0.95 | β |
| window_type | COMBO | hann | 5 options: hann, hamming, blackman, kaiser, rectangular |
| display_mode | COMBO | magnitude | 5 options: magnitude, power, log, mel, bark |
| frequency_scale | COMBO | log | 4 options: linear, log, mel, bark |
| frequency_range_low | FLOAT | 201β1000 | β |
| frequency_range_high | FLOAT | 200001000β48000 | β |
| amplitude | FLOAT | 0.800β2 | β |
| gate_thresholdopt | FLOAT | -60-120β0 | β |
| spectral_gateopt | BOOLEAN | false | β |
| smoothing_factoropt | FLOAT | 0.100β0.9 | β |
| peak_trackingopt | BOOLEAN | true | β |
| save_spectrumopt | BOOLEAN | false | β |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | β |
| spectrum_report | STRING | β |
| peak_frequency | FLOAT | β |
| spectral_centroid | FLOAT | β |
| spectral_energy | FLOAT | β |