Nodes/MD Nodes/MD: Mastering Compressor
ComfyUI Node

MD: Mastering Compressor

Multiband compression for AI audio — tame the peaks without killing the punch

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: Mastering Compressor
  • audio
  • AUDIO
sample_rate44100
enable_comptrue
comp_typeMultiband
comp_threshold_db-8.00
comp_ratio2.50
comp_attack_ms20.00
comp_release_ms250.00
comp_makeup_gain_db0.00
mb_crossover_low_mid_hz250.00
mb_crossover_mid_high_hz4000.00
mb_crossover_order8
mb_low_threshold_db-10.00
mb_low_ratio3.00
mb_low_attack_ms30.00
mb_low_release_ms300.00
mb_low_makeup_gain_db0.00
mb_mid_threshold_db-8.00
mb_mid_ratio2.50
mb_mid_attack_ms20.00
mb_mid_release_ms180.00
mb_mid_makeup_gain_db0.00
mb_high_threshold_db-6.00
mb_high_ratio2.00
mb_high_attack_ms10.00
mb_high_release_ms120.00
mb_high_makeup_gain_db0.00

Compression is where AI-generated audio either starts to sound "produced" or falls apart. MD_Mastering_Compressor is the dynamics stage of the MD mastering chain, and it does it properly: single-band or three-band multiband, with per-band threshold, ratio, attack, release, and makeup gain. It's the node that glues together the EQ'd mix and makes the loudness normalizer's job easy.

For AI music specifically, this matters more than you'd think. These models often pump or thump - one instrument grabs the dynamics and the whole track breathes with it. A multiband compressor lets you compress the low band without killing the vocal's transients up top, which is exactly the fix for "the kick drum is eating everything."

How it works

The node splits the work by comp_type. Single-Band treats the whole spectrum as one: everything above comp_threshold_db gets reduced by comp_ratio at comp_attack_ms/comp_release_ms speeds, with comp_makeup_gain_db bringing the level back up. Multiband splits the signal at two crossover frequencies (mb_crossover_low_mid_hz default 250 Hz, mb_crossover_mid_high_hz default 4000 Hz) into low/mid/high bands, each with its own threshold, ratio, attack, release, and makeup gain, then recombines. The crossover order controls how sharp the band separation is. All of it runs through the pack's DSP core on the waveform samples.

The inputs that matter

  • comp_type - Single-Band or Multiband. Multiband is the default and the more useful one for music; switch to single for simple glue.
  • comp_threshold_db / comp_ratio (single-band) - threshold at -8 dB, ratio 2.5:1 by default. Gentler than it sounds; that's a sensible starting point.
  • mb_crossover_low_mid_hz / mb_crossover_mid_high_hz - where the bands split. 250/4000 is a standard music layout.
  • mb_low_threshold_db / mb_low_ratio - the low band. Tighter threshold here tames boom and pumping.
  • mb_high_threshold_db / mb_high_ratio - the high band; use it to control sibilance and harshness without dulling the mids.
  • enable_comp - master on/off for the whole stage.

The per-band makeup gains default to 0; you'll add them back after listening. Output is a single AUDIO to continue into the limiter.

Installing

In the MD Nodes pack:

cd path/to/ComfyUI/custom_nodes
git clone https://github.com/MDMAchine/ComfyUI_MD_Nodes.git
cd ComfyUI_MD_Nodes
pip install -r requirements.txt

Or via ComfyUI Manager (MD Nodes), restart. The DSP core ships in-repo; the audio libraries in requirements back the pack's other audio nodes.

Common issues

The author's own launch post warned that mastering processing "can take a bit" - don't mistake slow renders for a hang on long files. And the classic compressor trap applies double here: makeup gain isn't a volume freebie. If you compress 6 dB and add 6 dB back, you've done nothing but add noise and squash transients. A common AI-music recipe: multiband, gently compress low band (3:1, -10 dB), leave mids almost untouched, then let the limiter catch the true peaks. Over-compressing is how you end up with a brick wall that the LUFS normalizer can't save.

CategoryMD_Nodes/Audio Processing

Inputs (27)

NameTypeDefaultDescription
audioAUDIOAUDIO INPUT
sample_rateINT441008000–192000SAMPLE RATE • Purpose: Fallback sample rate if not provided by audio dict.
enable_compBOOLEANtrueENABLE COMPRESSOR
comp_typeCOMBOMultiband2 options: Single-Band, Multiband
comp_threshold_dbFLOAT-8.00-60–0
comp_ratioFLOAT2.501–20
comp_attack_msFLOAT20.000.1–1000
comp_release_msFLOAT250.001–5000
comp_makeup_gain_dbFLOAT0.000–24
mb_crossover_low_mid_hzFLOAT250.00
mb_crossover_mid_high_hzFLOAT4000.00
mb_crossover_orderINT8
mb_low_threshold_dbFLOAT-10.00-60–0
mb_low_ratioFLOAT3.00
mb_low_attack_msFLOAT30.00
mb_low_release_msFLOAT300.00
mb_low_makeup_gain_dbFLOAT0.00
mb_mid_threshold_dbFLOAT-8.00-60–0
mb_mid_ratioFLOAT2.50
mb_mid_attack_msFLOAT20.00
mb_mid_release_msFLOAT180.00
mb_mid_makeup_gain_dbFLOAT0.00
mb_high_threshold_dbFLOAT-6.00-60–0
mb_high_ratioFLOAT2.00
mb_high_attack_msFLOAT10.00
mb_high_release_msFLOAT120.00
mb_high_makeup_gain_dbFLOAT0.00

Outputs (1)

NameTypeDescription
AUDIOAUDIO