Audio Mix
Layer audio without clipping, and use the start offset as a gap (Audio Mix)
- audio1
- audio
Mix is the workhorse of Audio General (niknah's audio-general-ComfyUI pack), and it solves the problem that shows up the moment your workflow grows a second audio source: how do you stack a voiceover over a music bed, or lay several TTS clips end to end, without the sum exploding past 0 dB? You feed it a bunch of AUDIO streams with a volume and a start time each, and it hands back one merged AUDIO - resampled to a common rate, padded to a common length, and normalized so overlapping tracks don't clip. The README's own pitch for it is "mix audios with volume & time adjustment. Can be used to add spacing," and that last bit is the feature people actually lean on.
How it works
audio1 is required, with volume1 and start_secs1 next to it. Connect a second audio source and the node grows audio2, volume2, start_secs2 - it keeps adding inputs for every track you wire in (that's the dynamic-AnyType wiring doing its thing). Each start_secs pads the front of that track with silence, so "wait 1.4 seconds then start" is just a number. Internally every track gets upsampled to the highest sample rate among them, padded to the longest duration, scaled by its volume, and summed.
The interesting part is the constant_volume toggle, which is on by default as false. That makes the node divide by the number of tracks actually audible at each moment rather than the total track count. Where only one track plays, it stays at full volume; where two overlap, each gets halved. It's a crude but effective guard against the classic mixing mistake of two normal-sounding tracks becoming a distorted pile where they collide. Flip constant_volume to true and it just divides by the total count - a proper average, which keeps the mix level steady no matter how many layers you add, at the cost of every layer getting quieter as the stack grows.
The inputs that matter
volume1- 0 is silent, 0.5 is half, 1 is normal, 2 is double. Negative values drop the track entirely.start_secs1- seconds of silence before this track kicks in. This is your "add spacing" lever: stagger voiceover lines by giving each a start time and you get natural gaps without editing anything.constant_volume- leave false unless you're averaging many equal layers.
The output is a single AUDIO; wire it into PreviewAudio, SaveAudio, or your video node's audio input.
Install
From ComfyUI Manager, search "Audio General" and install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/niknah/audio-general-ComfyUI
Restart ComfyUI. No models, no weights - the pack's pip dependencies (torchaudio, librosa, torch-time-stretch, audiostretchy) get installed for you. It runs on CPU.
Where people get burned
Mixing tracks recorded at different sample rates is handled, so don't fear that. The real gotcha is that constant_volume defaults to the overlap-aware mode, which means a quiet solo section stays quiet relative to an overlap section - if that surprises you, flip the toggle. And remember this sums waveforms, it doesn't duck or sidechain; it's a utility mixer, not a DAW. For most ComfyUI audio work - voiceover over music, stacked TTS clips, spacing out narration - it's more than enough.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| constant_volume | BOOLEAN | false | — |
| audio1 | AUDIO | — | |
| volume1 | FLOAT | 1.00 | Example: 0 = silent, 0.5 = half, 1 = normal, 2 = twice volume |
| start_secs1 | FLOAT | 0.0 | Number of seconds to wait before starting audio |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |