Nodes/ComfyUI_MusicTools/Music - Audio Mixer
ComfyUI Node

Music - Audio Mixer

Mix Two Tracks Without Fighting Sample Rates or Channel Counts

By jeankassio·Created 9 months ago·Updated a day ago· 154
Music - Audio Mixer
  • audio_1
  • audio_2
  • AUDIO

The boring stuff is what actually kills audio workflows: you want to layer a TTS voice over a generated instrumental, and the two tracks come in at different sample rates, different channel counts, and different lengths. Summing them naively is a mess. Music - Audio Mixer from ComfyUI MusicTools is the node that makes that just work - it takes two AUDIO inputs and outputs one mixed AUDIO, handling the conversion for you.

What it does under the hood

The source is refreshingly explicit about the mechanics:

  • Sample-rate conversion - if audio_2's sample rate differs from audio_1's, the second is resampled to match the first before any summing happens. The output inherits audio_1's rate.
  • Channel matching - mono and stereo inputs get matched so a mono vocal layers cleanly onto a stereo bed.
  • Duration padding - the shorter track is padded to the length of the longer one, so you don't get a truncated tail or an early cut-off.

Then it sums, with automatic level handling to keep the output from clipping instantly. One AUDIO out. No knobs - the interface is literally just audio_1 and audio_2.

How to actually use it

The two-input, no-controls design makes it a mixing bus, and you build the actual mix around it:

  • Voiceover over music - feed the vocal on audio_1, the instrumental on audio_2. Since audio_1 wins on sample rate, put the track whose rate you want to keep on the first input.
  • Levels - the mixer has no volume knobs, so set levels with Music - Gain before the mixer, or trim stems with Music - Stem Recombination's volume sliders before they hit this node.
  • Layering a generated beat under another - same drill: trim, then mix.

Because the output is plain AUDIO, you can chain mixers to sum more than two sources: mixer A sums 1+2, mixer B sums that result with source 3. It's a little clunky but it works.

The honest take

Two things to know. First, it's a sum, not a blend: no crossfade, no per-input trim, no panning. If you need to fade two tracks together (a voiceover fading out under a song intro), this node alone won't do it - you'd want to trim/duck upstream. Second, when mixing music with a voiceover, the classic failure is the voice getting buried or the bed clipping at the sum. The pack's own guidance - and general practice - is to put a little gain reduction on whichever track you want quieter before it reaches the mixer, then let a compressor/LUFS stage after the mixer sort out the final level. Mix first, then master.

Install

Standard pack install:

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. Pure NumPy/SciPy summing - no models, no GPU, runs on CPU without breaking a sweat.

Categorymusic

Inputs (2)

NameTypeDefaultDescription
audio_1AUDIO
audio_2AUDIO

Outputs (1)

NameTypeDescription
AUDIOAUDIO