Music - Gain
Exact Gain, in dB, Nothing Else
- audio
- AUDIO
Sometimes a node should just be one number. Music - Gain from ComfyUI MusicTools is exactly that: an exact linear gain adjustment in dB, from −24 dB to +24 dB, applied to whatever AUDIO you feed it. One input, one output, one knob. It's the plumbing node of the pack, and it earns its place because every other node in the pack expects sensible levels and nothing gives you an exact level the way a raw gain stage does.
The one knob
gain_db (FLOAT, −24 to +24, step 0.5, default 0). Negative to turn down, positive to turn up. The "exact" in the description is doing real work: it's a straight multiplication in the linear domain, so +6 dB is exactly +6 dB - no interpolation, no hidden soft-clipping behavior, no curve. What you ask for is what you get.
Why you'd actually use it
- Matching levels before a mix. Two tracks into Music - Audio Mixer? Trim one down 6 dB first so the sum has headroom instead of clipping.
- Dialing in loudness before normalization. If a track is 10 dB too quiet to measure properly, gain it up first, then let the LUFS normalizer do the precise work.
- Trimming a stem. Vocals too hot after stem separation? −3 dB on the way into recombination beats fighting the volume slider.
- Undoing something. The pack is a chain of processing; a clean gain stage at the front lets you compensate for a previous node's output level without touching its parameters.
Honest framing: gain staging is boring, and that's the point. It's the audio equivalent of a "multiply by constant" node - you don't need it to be clever, you need it to be exact and not add artifacts.
The one thing to be careful about
+24 dB is a lot, and this node has no limiter and no safety net. If you push a hot track up and it exceeds full scale, the output will clip - the node won't stop you, and downstream nodes will get a distorted signal. That's not a bug; it's what "exact" means. If you need to make something louder safely, that's the job of the compressor + limiter + LUFS chain, not a raw gain boost. The correct order: compress to even out, limit to protect peaks, gain to set the level, and this node is only the last of those.
Install
Same pack install as every node here:
cd ComfyUI/custom_nodes
git clone https://github.com/jeankassio/ComfyUI_MusicTools.git
cd ComfyUI_MusicTools
python -m pip install -r requirements.txt
Restart, find it under music. It's a single multiplication on a NumPy array - no models, no GPU, instant even on huge files. The whole pack uses the standard ComfyUI AUDIO value (a [batch, channels, samples] waveform plus a sample rate), and this node preserves both through untouched.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| gain_db | FLOAT | 0.0-24–24 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | — |