AudioX Volume Control
Simple dB gain that won't clip
- audio
- audio
- peak_level_db
- info
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
AUDIOto 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
FLOATwith the final peak, useful for chaining or logging. - info - a
STRINGsummarizing 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
infostring is where the numbers live. Peak level is also output as aFLOATif 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.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| volume_db | FLOAT | 0.00-60–20 | Volume adjustment in decibels (dB). 0dB = no change, +6dB = double volume, -6dB = half volume |
| step_sizeopt | FLOAT | 0.100.01–1 | Step size for volume slider precision (0.01 = very fine, 1.0 = coarse) |
| normalize_afteropt | BOOLEAN | false | Normalize audio after volume adjustment to prevent clipping |
| soft_limitopt | BOOLEAN | true | Apply soft limiting to prevent harsh clipping |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| peak_level_db | FLOAT | — |
| info | STRING | — |