ComfyUI Node: Audio Gain Match

Class Name

Audio Gain Match

Category
Egregora/Analysis
Author
lucasgattas (Account age: 2973days)
Extension
ComfyUI · Egregora Audio Super‑Resolution
Latest Updated
2025-10-15
Github Stars
0.04K

How to Install ComfyUI · Egregora Audio Super‑Resolution

Install this extension via the ComfyUI Manager by searching for ComfyUI · Egregora Audio Super‑Resolution
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI · Egregora Audio Super‑Resolution in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Audio Gain Match Description

Adjust audio input gain to match reference level for consistent loudness, ideal for mastering and broadcast workflows.

Audio Gain Match:

The Audio Gain Match node is designed to adjust the gain of an audio input to match a reference audio level, ensuring consistent loudness across different audio tracks. This node is particularly useful in audio processing workflows where maintaining a uniform loudness level is crucial, such as in audio mastering or broadcast environments. By employing either the LUFS (Loudness Units relative to Full Scale) or RMS (Root Mean Square) methods, the node calculates the necessary gain adjustment to align the input audio with the reference audio. This process helps in achieving a balanced audio output, enhancing the listening experience by preventing abrupt volume changes. The node's ability to handle sample rate mismatches by resampling ensures compatibility and seamless integration into various audio processing pipelines.

Audio Gain Match Input Parameters:

audio_ref

This parameter represents the reference audio against which the input audio will be gain-matched. It is crucial for determining the target loudness level that the input audio should achieve. The reference audio should be carefully selected to represent the desired loudness level for the final output.

audio_in

This parameter is the input audio that needs to be gain-matched to the reference audio. The node will adjust the gain of this audio to match the loudness level of the reference audio, ensuring consistency in volume.

mode

The mode parameter determines the method used for gain matching, either LUFS-I for integrated loudness or RMS for root mean square. The choice of mode affects how the loudness levels are calculated and can impact the final audio output. The default mode is LUFS-I.

max_gain_db

This parameter sets the maximum allowable gain adjustment in decibels. It limits the extent to which the input audio's gain can be increased or decreased to match the reference audio. The default value is 12.0 dB, with a range that can be adjusted based on the specific requirements of the audio processing task.

Audio Gain Match Output Parameters:

out

This output is the gain-matched audio, which has been adjusted to match the loudness level of the reference audio. It ensures a consistent listening experience by aligning the input audio's volume with the reference.

gain_db

This output provides the amount of gain adjustment applied to the input audio in decibels. It indicates how much the input audio's volume was increased or decreased to achieve the desired loudness level.

ref_level

This output represents the loudness level of the reference audio, calculated using the selected mode (LUFS or RMS). It serves as a benchmark for the gain-matching process.

in_level

This output indicates the initial loudness level of the input audio before any gain adjustment. It provides insight into the original volume of the input audio relative to the reference.

Audio Gain Match Usage Tips:

  • Ensure that the reference audio is representative of the desired loudness level for your project to achieve optimal results.
  • Use the LUFS-I mode for more accurate loudness matching in broadcast and streaming applications, as it considers the perceived loudness over time.
  • Adjust the max_gain_db parameter to prevent excessive gain changes that could introduce distortion or clipping in the audio.

Audio Gain Match Common Errors and Solutions:

Sample rate mismatch

  • Explanation: The input audio and reference audio have different sample rates, which can lead to inaccurate gain matching.
  • Solution: The node automatically resamples the input audio to match the reference audio's sample rate. Ensure that the reference audio's sample rate is set correctly for your project.

Excessive gain adjustment

  • Explanation: The gain adjustment exceeds the max_gain_db limit, potentially causing distortion.
  • Solution: Review the max_gain_db setting and adjust it to allow for sufficient gain changes without introducing distortion. Consider using a reference audio with a closer initial loudness level to the input audio.

Audio Gain Match Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI · Egregora Audio Super‑Resolution
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.