Nodes/ComfyUI · Egregora Audio Super‑Resolution/Egregora Audio Gain Match (1770)
ComfyUI Node

Egregora Audio Gain Match (1770)

Egregora's BS.1770 loudness-matching node (and why there are two)

By lucasgattas·Created 12 months ago·Updated 7 months ago· 60
Egregora Audio Gain Match (1770)
  • audio_ref
  • audio_in
  • audio_matched
  • gain_db
  • ref_level
  • in_level
mode
max_gain_db12.0

Yes, there are two gain-matching nodes in this pack, and yes, it's slightly confusing. This one - Audio Gain Match (1770) - lives in the Eval pack alongside the loudness meter, and it's the "official" loudness-flavored version: it matches your input audio's level to a reference using integrated LUFS (the BS.1770-style loudness number) or RMS, so you can compare or mix files that were mastered at very different levels. The other Audio Gain Match in the null-test suite is the same idea with a tighter safety clamp.

Why two? Because they serve different workflow slots. The null-test one is optimized for the alignment → match → subtract pipeline, with a ±48 dB clamp that's fine for the small corrections you expect after aligning the same source through a processor. This one widens the clamp to ±60 dB - so it can drag a whisper-quiet file up to match a loud reference - which makes it the right tool for comparing files from different sources or mastering stages, not just before/after versions of the same track.

How it works

Same mechanics as its sibling: pick mode (LUFS-I or RMS), the node computes the reference and input levels, derives the gain difference, clamps it to max_gain_db (default 12, range ±60), and applies it. It resamples to the reference rate first if needed. The levels it reports are the loudness-metric readings, so with LUFS-I you're matching perceived loudness - the streaming-platform measurement - which is the honest way to make a "is this actually better" comparison.

The inputs that matter

  • audio_ref - the level target.
  • audio_in - what gets matched.
  • mode - LUFS-I for perceptual matching (default and usually right), RMS for pure energy.
  • max_gain_db - the clamp. The wider ±60 range here is the point of this node.

Outputs: audio_matched, plus gain_db, ref_level, and in_level FLOATs.

When to reach for it

Pair it with the Loudness Meter (BS1770) node for a full loudness workflow: measure first, match, then A/B at equal loudness. If you're normalizing a batch of tracks so they sit consistently against one another, this node + a loop is the pattern. And the honest version of the "which one" question: it genuinely doesn't matter much for a single-file A/B - use whichever you find first. But if you want the wider correction range and the loudness-meter lineage, this is the one.

CategoryEgregora/Analysis

Inputs (4)

NameTypeDefaultDescription
audio_refAUDIO
audio_inAUDIO
modeoptCOMBO2 options: LUFS-I, RMS
max_gain_dboptFLOAT12.0-60–60

Outputs (4)

NameTypeDescription
audio_matchedAUDIO
gain_dbFLOAT
ref_levelFLOAT
in_levelFLOAT