Nodes/MKRShift_Nodes/Compressor + Gate
ComfyUI Node

Compressor + Gate

A compressor and a noise gate that live in your graph, not your DAW

By criskb·Created 7 months ago·Updated 5 months ago· 0
Compressor + Gate
  • audio
  • audio
  • output_path
  • duration_sec
  • summary
threshold_db-18.0
ratio3.0
attack_ms10.0
release_ms120.0
gate_threshold_db-50.0
gate_floor_db-24.0
makeup_db0.0
output_formatauto
filename_prefixMKR_comp_gate
subfolder
overwritefalse
filename_label

AI voiceovers are great until the level jumps between sentences and the room tone hums underneath. MKRCompressorGate is the node that fixes both in one pass: a compressor that tames the peaks, plus a noise gate that ducks the silence, all running in your graph instead of forcing you to round-trip audio through a DAW. If you're muxing generated speech into a video, this is the "make it sound like someone actually mixed it" step.

Part of MKRShift_Nodes by criskb. Install via ComfyUI Manager (search "MKRShift_Nodes") or git clone https://github.com/criskb/MKRShift_Nodes into custom_nodes/, restart. It needs ffmpeg on your system to decode the input and write the output - that's the pack's one real system dependency for its audio/video nodes.

How it works

The node loads the audio to a waveform, follows an envelope with your attack and release times, and applies three gain stages per sample:

  • Compression: above threshold_db, the level is pulled down by ratio (3:1 default) - exactly like a studio compressor.
  • Gate: below gate_threshold_db, gain fades toward gate_floor_db (a -24 dB floor, not full silence - so you keep a touch of ambience instead of a hard click).
  • Makeup gain: makeup_db boosts the whole thing back up after compression eats your loudness.

It writes the result via ffmpeg to output_format (auto/wav/mp3/flac/ogg) under filename_prefix/subfolder, honoring overwrite.

The knobs a beginner actually sets

  • threshold_db (default -18) - where compression kicks in. Voiceovers that peak loud: start lower.
  • ratio (default 3) - how hard it squashes. 2–4 is natural for dialog; higher sounds pumped.
  • gate_threshold_db (default -50) - the level below which the gate closes. If your gate is chopping words, lower it.
  • makeup_db (default 0) - restore loudness after compression.

Outputs: audio (an MKR_AUDIO payload you can chain into mux/trim nodes), output_path, duration_sec, and a summary.

Where people get burned

The gate and compressor share one envelope follower, so a loud click can keep the gate open longer than you'd expect. And because the gate floor is -24 dB rather than silence, "gated" audio still has a bed - that's intentional, so don't fight it thinking the node is broken. Start with the defaults, listen, then nudge. It's DSP, not magic, but it beats leaving your voiceover flat and hissy.

CategoryMKRShift Nodes/Media/Audio/Utility

Inputs (13)

NameTypeDefaultDescription
audio*
threshold_dbFLOAT-18.0-60–0
ratioFLOAT3.01–20
attack_msFLOAT10.00.1–500
release_msFLOAT120.01–2000
gate_threshold_dbFLOAT-50.0-90–0
gate_floor_dbFLOAT-24.0-60–0
makeup_dbFLOAT0.0-24–24
output_formatCOMBOauto5 options: auto, wav, mp3, flac, ogg
filename_prefixSTRINGMKR_comp_gate
subfolderSTRING
overwriteBOOLEANfalse
filename_labeloptSTRING

Outputs (4)

NameTypeDescription
audioMKR_AUDIO
output_pathSTRING
duration_secFLOAT
summarySTRING