Nodes/ComfyUI-AudioX/AudioX Volume Control
ComfyUI Node

AudioX Volume Control

Simple dB gain that won't clip

By lum3on·Created about a year ago·Updated about a year ago· 53
AudioX Volume Control
  • audio
  • audio
  • peak_level_db
  • info
volume_db0.00
step_size0.10
normalize_afterfalse
soft_limittrue

Every AI-generated audio clip needs a gain stage at some point - the model's output won't always sit at the loudness you want next to your other assets. This is the pack's basic volume trimmer: set a level in dB, it applies the gain, keeps things from clipping, and tells you the resulting peak. Nothing fancy, but it does the job without requiring you to think about loudness standards.

The math is the part worth knowing, because it's the same gain math every audio tool uses: volume in dB converts to a linear multiplier with 10^(dB/20). So +6 dB = double amplitude, -6 dB = half. The node applies that to the waveform, then protects you from your own enthusiasm - if the result would clip, the optional soft limiting (a tanh curve, on by default) squashes it, and there's a hard clamp to the [-1, 1] range as a final safety net.

Inputs that matter

  • audio - the AUDIO to adjust.
  • volume_db - the actual control: -60 to +20 dB, default 0 (no change).
  • step_size (optional) - 0.01 to 1.0, default 0.1. This is a slider-precision setting, but it also rounds the applied gain to the step. Leave it at 0.1 unless you want ultra-fine control.
  • normalize_after (optional, default off) - peak-normalizes after the gain. Different from soft limiting: it rescales so the peak hits 1.0.
  • soft_limit (optional, default on) - the tanh clipper that stops harsh clipping when you push gain too far.

Outputs:

  • audio - the adjusted AUDIO.
  • peak_level_db - a FLOAT with the final peak, useful for chaining or logging.
  • info - a STRING summarizing volume, peak, step, and duration.

Install & troubleshooting

Pack install as usual - no model weights needed for this one, it's pure waveform math:

cd ComfyUI/custom_nodes
git clone https://github.com/lum3on/ComfyUI-StableAudioX.git
cd ComfyUI-StableAudioX
pip install -r requirements.txt

The wrinkles people hit:

  • Soft limiting changes the character, not just the level. If your audio sounds "squashed" at high gain, that's the tanh limiter doing its thing. Dial the gain back instead of relying on the limiter.
  • +20 dB isn't a 20 dB boost if you clip. The limiter and clamp mean the perceived loudness won't match the number you typed past the clipping point. That's a feature, but it reads like a bug.
  • The info string is where the numbers live. Peak level is also output as a FLOAT if you want to feed it into logic.

When you need to just make something a bit louder or quieter with one knob, this is the node. Need broadcast-standard loudness, fades, and a real limiter? That's what the AudioX Advanced Volume Control is for - this one's the quick edit.

CategoryAudioX/Utils

Inputs (5)

NameTypeDefaultDescription
audioAUDIO
volume_dbFLOAT0.00-60–20Volume adjustment in decibels (dB). 0dB = no change, +6dB = double volume, -6dB = half volume
step_sizeoptFLOAT0.100.01–1Step size for volume slider precision (0.01 = very fine, 1.0 = coarse)
normalize_afteroptBOOLEANfalseNormalize audio after volume adjustment to prevent clipping
soft_limitoptBOOLEANtrueApply soft limiting to prevent harsh clipping

Outputs (3)

NameTypeDescription
audioAUDIO
peak_level_dbFLOAT
infoSTRING