Audio Loudness Match ποΈ
The 'Color Match' That Levels Don't
- audio
- reference
- audio
- applied_gain_db
- summary
Here's the scenario that makes this node worth knowing: you generated a voiceover or a music bed, and you want it to sit at the same perceived volume as another track you already have - a reference you like the level of. The naive fix is Audio Normalize, but that targets a number you pick, and you don't know what number matches your reference. Audio Loudness Match is the audio equivalent of video color match: it measures the reference clip's actual loudness and applies gain to your clip until it matches. Target the reference, not a guess.
How it works
The mechanism is honest and simple: it measures the reference's loudness as RMS-based dBFS, computes the gain needed to bring your clip to that level, and applies it (with a cap). The interesting knob is use_perceptual_weighting (on by default) - before measuring RMS, it applies an A-weighting-style frequency emphasis that boosts the 1β5kHz range where human hearing is most sensitive. That gets you closer to perceived loudness than flat RMS, which is the whole point of matching by feel rather than by meter.
The source is refreshingly candid about the limits, and you should carry that into your expectations: it's "good enough for 'make these two clips feel similarly loud,' not intended for broadcast loudness compliance." It is not a full ITU-R BS.1770 LUFS implementation. If you're mastering for a platform with loudness specs, this isn't that. If you're muxing generated dialogue over a music track and don't want the levels to visibly jump between clips, this is exactly that.
max_gain_db (default 18, up to 40) caps how much gain gets applied in either direction - the guard against a near-silent reference demanding a ludicrous, noise-amplifying boost from a loud clip. And soft_clip smooths any overshoot at the output stage. Both are worth leaving at defaults until you have a reason not to.
The output that makes it verifiable
Besides the matched audio, it returns applied_gain_db - the actual amount of gain it decided to apply. That's a great debugging wire: if it's slamming against the max_gain_db cap, your reference is probably too quiet (or too loud) and the match is being limited by the safety valve, not achieved. Wire it into a display node and you can see at a glance whether the match is real or clamped.
Install and gotchas
ComfyUI Manager β search OmniNodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/TensorVizion/OmniNodes
Restart ComfyUI; it's under TensorVizion/Audio. Pure NumPy, no extra dependencies.
The one mental trap: don't confuse this with Audio Normalize. Normalize = "hit this number." Match = "be as loud as that clip." If you're combining several sources into one mix, match is usually what you actually want - which is why the pack's own summary calls it the more common need when combining audio that should sit at the same level.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | β | |
| reference | AUDIO | β | |
| use_perceptual_weighting | BOOLEAN | true | β |
| max_gain_db | FLOAT | 18.01β40 | β |
| soft_clip | BOOLEAN | true | β |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | β |
| applied_gain_db | FLOAT | β |
| summary | STRING | β |