Nodes/ComfyUI-sonar/SonarPowerFilter
ComfyUI Node

SonarPowerFilter

Design a frequency filter you can reuse on any noise

By blepping·Created 3 years ago·Updated 12 days ago· 49
SonarPowerFilter
  • power_filter_opt
  • SONAR_POWER_FILTER
alpha0.000
max_freq0.707
min_freq0.000
stretch1.000
rotate0
pnorm2.0
oversample4
blur0.13
scale1.0
compose_mode

SonarPowerFilter doesn't generate noise at all. It builds a filter - a shape in the frequency domain - that you then apply to noise with SonarPowerFilterNoise. Think of it as the "design the lens" node in a system where the other node is "point the lens at your noise." It's the most compositional node in the pack's power-noise family, and the payoff is that one well-tuned filter becomes a reusable recipe across many noise sources.

What you're actually designing

A power filter controls which spatial frequencies of your noise get through and how strongly. Frequency is the "how fine-grained" axis: low frequencies are big smooth blobs, high frequencies are fine texture. The inputs map directly onto shaping that:

  • alpha - the tone knob. Positive values amplify low frequencies (softer, broader noise); negative values amplify high frequencies (crisper, finer texture).
  • min_freq / max_freq - the band limits. The defaults, 0 to 0.7071, pass the whole usable band; tighten them to make a true band-pass filter.
  • stretch and rotate - shape the filter anisotropically. This is how you get noise that's stretched horizontally or runs at an angle, which reads as directional texture (brush strokes, grain direction, fabric weave).
  • pnorm - cushions the band-pass edges so the cutoff isn't a hard cliff (default 2).
  • blur - slightly blurs the filter to reduce artifacts. Default 0.125.
  • oversample - the filter's internal resolution. Default 4; raise it if you see filter-shaped artifacts.
  • scale - overall filter strength. Negative flips it.

And compose_mode - max, min, add, sub, or mul - combines this filter with an optional second power_filter_opt input. Two filters multiplied or subtracted gives you shapes no single parameter set can reach, like a notch (everything except one band).

How to use it

Output is SONAR_POWER_FILTER, which wires into SonarPowerFilterNoise's sonar_power_filter input. The tooltips and the README's docs/advanced_power_noise.md walk through the full recipe; a good first session is alpha at +1 for soft dreamy noise, or -1 with a slight stretch for film-grain texture.

The gotcha

The filter exists in frequency space; oversample controls how finely that's sampled. Crank it too low and you get boxy, aliased noise instead of smooth filtering. If your filtered noise looks grid-like, that's usually oversample - not your alpha - and it's the first thing to raise.

Install

Part of the ComfyUI-sonar pack. ComfyUI Manager → search "ComfyUI-sonar" → Install → restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/blepping/ComfyUI-sonar

No models, no extra deps. The original SonarPowerNoise was contributed to the pack by elias-gaeros, and this filter object is the refactor he pushed for - separate filter from noise so you can build, preview, and reuse filters. If you want to see what your filter does before wiring it into a full chain, SonarPowerFilterNoise has a preview mode that displays the filter shape and a noise sample.

Categoryadvanced/noise

Inputs (11)

NameTypeDefaultDescription
alphaFLOAT0.000-5–5Values above 0 will amplify low frequencies, negative values will amplify high frequencies.
max_freqFLOAT0.7070–0.7071Maximum frequency to pass through the filter.
min_freqFLOAT0.0000–0.7071Minimum frequency to pass through the filter.
stretchFLOAT1.0000.01–100Stretches the filter's shape by the specified factor.
rotateFLOAT0-90–90Rotates the filter.
pnormFLOAT2.00.125–100Factor used for cushioning the band-pass region.
oversampleINT41–128Oversampling factor used for the filter size.
blurFLOAT0.13-10–10Slightly blurs the filter to reduce artifacts.
scaleFLOAT1.0-100–100Scales the filter to the specified strength. May be negative.
compose_modeCOMBOControls composition of the option attached filter. For example, when set to MUL the result will be this filter multiplied by the attached filter. No effect if the optional filter input is not attached.
power_filter_optoptSONAR_POWER_FILTER

Outputs (1)

NameTypeDescription
SONAR_POWER_FILTERSONAR_POWER_FILTER