Sidechain Ducker
Duck your music bed under the voiceover, ComfyUI edition
- main_audio
- sidechain_audio
- audio
- output_path
- duration_sec
- summary
Ducking is the audio move you've heard a thousand times without knowing its name: when a voiceover comes in, the music behind it quietly dips out of the way, then swells back when the voice stops. In every DAW it's a routing and sidechain affair. MKRSidechainDucker does the same thing as a single ComfyUI node - two audio inputs in, one ducked mix out - which means you can build it into a generation pipeline instead of babysitting it in another app.
What it's for
You've generated a music bed and you've generated (or recorded) a voiceover, and you want the final audio to sound like a real edit rather than two tracks fighting. Wire the voice into main_audio, the music into sidechain_audio... wait, flipped: main_audio is the track that stays prominent and sidechain_audio is the one that triggers the ducking. Common setup: main_audio = music bed, sidechain_audio = voiceover, so the music ducks under the voice. The voiceover itself stays untouched.
How it works
Both inputs are wildcard (file, waveform, or MKR_AUDIO payload). It decodes the sidechain, resamples it to the main track's sample rate, and pads/truncates to the same length. The sidechain envelope drives the gain: whenever the sidechain level crosses threshold_db (default -40 dB), the main track's gain drops by duck_db (default -12 dB), with attack_ms (15) and release_ms (180) shaping how fast it dives and recovers. Slower release = smoother, less "pumping" sound.
Inputs and outputs
main_audio- the track that gets ducked (your music bed).sidechain_audio- the trigger (your voiceover).duck_db- how much gain reduction, default -12 dB.threshold_db- how loud the trigger must be before ducking starts.attack_ms/release_ms- envelope shaping.output_format,filename_prefix,subfolder,overwrite, optionalfilename_label.
Outputs: audio (MKR_AUDIO payload), output_path, duration_sec, summary.
Installing it
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/criskb/MKRShift_Nodes
restart ComfyUI, or Manager → MKRShift_Nodes. WAV output works without extra tools; mp3/flac/ogg encoding needs ffmpeg on PATH.
Common issues
The classic beginner stumble is mixing up which track ducks - if the voiceover is the one getting quiet, you've swapped the inputs. If the duck sounds like a pumpy mess, raise attack_ms a little and increase release_ms; if the music never ducks at all, the voice isn't crossing threshold_db - lower it. And remember the sidechain is resampled to the main track's rate and clipped to its length, so wildly different-length inputs just get truncated rather than aligned.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| main_audio | * | — | |
| sidechain_audio | * | — | |
| duck_db | FLOAT | -12.0-36–-1 | — |
| threshold_db | FLOAT | -40.0-80–0 | — |
| attack_ms | FLOAT | 15.00.5–500 | — |
| release_ms | FLOAT | 180.01–2000 | — |
| output_format | COMBO | auto | 5 options: auto, wav, mp3, flac, ogg |
| filename_prefix | STRING | MKR_sidechain_duck | — |
| subfolder | STRING | — | |
| overwrite | BOOLEAN | false | — |
| filename_labelopt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| audio | MKR_AUDIO | — |
| output_path | STRING | — |
| duration_sec | FLOAT | — |
| summary | STRING | — |