MD: Mastering Chain (Full)
A whole mastering suite in one node
- audio
- audio
- waveform_before
- waveform_after
AI-generated audio almost always comes out of the sampler too quiet, too boomy, or with harsh digital top end. Fixing that used to mean exporting to a DAW. MasteringChainNode is the in-graph alternative: gain, filters, EQ, compression, and a limiter arranged in a proper mastering signal chain, all behind one node with a BEFORE/AFTER waveform comparison.
The chain order is the classic one, and the node follows it: input gain → highpass/lowpass cleanup → EQ (a high shelf plus three optional parametric bands) → compressor (single or multiband) → brickwall limiter last. That's a real mastering order - the limiter goes at the very end so nothing after it can push you back into clipping.
The stages that matter
master_gain_db- input trim before processing. Leave at 0 unless the source is unusually quiet.- Highpass/lowpass - the "cleanup" stage.
enable_highpasswithhighpass_freqaround 30Hz kills sub-mud; the lowpass (default off, 18kHz) trims harsh top end.*_ordersets filter steepness. - EQ - a
eq_high_shelffor air, an optional low shelf, and four parametric bands (55Hz, 125Hz, 1.25kHz, 5kHz defaults) with gain, frequency, and Q. You don't need all four - enable the ones that matter and leave the rest off. - Compressor -
enable_comptoggles it.comp_typeis the important choice: Multiband (default) compresses low/mid/high independently with per-band threshold/ratio/attack/release/makeup, which is what mastering actually wants; Single-Band is the blunt instrument. Crossover points at 250Hz and 4kHz split the bands. - Limiter -
enable_limiter, recommended true,limiter_ceiling_dbat -0.1dB by default so peaks never clip.
Everything is toggled by an enable_* switch rather than a value of zero, which is genuinely nicer than the alternative - it means "off" is truly off and you can A/B a stage without remembering its original settings.
Outputs
audio (the mastered waveform - same AUDIO format in, AUDIO format out, so it chains into a save/preview node), plus waveform_before and waveform_after as IMAGE plots. Wire those two into a comparer and you can see what the chain actually did without listening to a single export.
Installing it
Part of MD Nodes (MDMAchine/ComfyUI_MD_Nodes). ComfyUI Manager → search MD_Nodes → Install, restart, or:
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
The audio DSP here leans on pedalboard (the README lists it among the audio requirements), and the waveform plots need matplotlib. Both are in the requirements file. Python 3.10+, current ComfyUI.
Common issues
The author's own launch post warned this node "can take a bit to process" - it's doing real DSP per sample, so long tracks plus multiband compression can be slow; expect a wait, not a hang. If you push master_gain_db positive and enable the limiter, the limiter just eats the headroom - set the chain up so the limiter's ceiling is the loudest thing you allow. And if the output sounds lifeless, check whether you've enabled more compression bands than you need; a -10dB threshold across all three bands is a lot of glue.
Inputs (60)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | AUDIO INPUT • Purpose: Raw audio waveform to be mastered. • Range: [Batch, Channels, Samples]. • Output: Mastered audio dictionary. | |
| sample_rate | INT | 441008000–192000 | SAMPLE RATE • Purpose: Fallback sample rate if not provided by audio dict. |
| master_gain_db | FLOAT | 0.0-60–24 | MASTER GAIN (DB) • Purpose: Input gain adjustment before processing. • Range: -60dB to +24dB. ⭐ Recommended: 0.0 unless audio is exceptionally quiet. |
| enable_lowpass | BOOLEAN | false | ENABLE LOWPASS • Purpose: Attenuate frequencies above the lowpass_freq. |
| lowpass_freq | FLOAT | 1800020–22000 | LOWPASS FREQUENCY • Purpose: The cutoff frequency in Hz. |
| lowpass_order | INT | 41–8 | LOWPASS SLOPE • Purpose: Sharpness of the cut (Higher = steeper). |
| enable_highpass | BOOLEAN | false | ENABLE HIGHPASS • Purpose: Attenuate sub-frequencies below highpass_freq. |
| highpass_freq | FLOAT | 2010–1000 | HIGHPASS FREQUENCY • Purpose: The cutoff frequency in Hz. ⭐ Recommended: 30Hz to remove sub-mud. |
| highpass_order | INT | 41–8 | HIGHPASS SLOPE • Purpose: Sharpness of the cut. |
| eq_high_shelf_gain_db | FLOAT | 0.0-24–24 | HIGH SHELF GAIN • Purpose: Boost/cut high frequencies (dB). |
| eq_high_shelf_freq | FLOAT | 120001000–22000 | HIGH SHELF FREQUENCY • Purpose: Start point of the shelf (Hz). |
| enable_low_shelf_eq | BOOLEAN | false | ENABLE LOW SHELF • Purpose: Toggle low frequency shelf filter. |
| eq_low_shelf_gain_db | FLOAT | 0.0-24–24 | LOW SHELF GAIN • Purpose: Boost/cut low frequencies (dB). |
| eq_low_shelf_freq | FLOAT | 7520–1000 | LOW SHELF FREQUENCY • Purpose: Start point of the shelf (Hz). |
| enable_param_eq1 | BOOLEAN | false | ENABLE BAND 1 • Purpose: Low-Mid parametric EQ band. |
| param_eq1_gain_db | FLOAT | 0.0-24–24 | BAND 1 GAIN (dB) |
| param_eq1_freq | FLOAT | 5520–22000 | BAND 1 FREQ (Hz) |
| param_eq1_q | FLOAT | 2.00.1–10 | BAND 1 Q FACTOR (Width) |
| enable_param_eq2 | BOOLEAN | false | ENABLE BAND 2 • Purpose: Mid parametric EQ band. |
| param_eq2_gain_db | FLOAT | 0.0-24–24 | BAND 2 GAIN (dB) |
| param_eq2_freq | FLOAT | 12520–22000 | BAND 2 FREQ (Hz) |
| param_eq2_q | FLOAT | 2.00.1–10 | BAND 2 Q FACTOR (Width) |
| enable_param_eq3 | BOOLEAN | false | ENABLE BAND 3 • Purpose: High-Mid parametric EQ band. |
| param_eq3_gain_db | FLOAT | 0.0-24–24 | BAND 3 GAIN (dB) |
| param_eq3_freq | FLOAT | 125020–22000 | BAND 3 FREQ (Hz) |
| param_eq3_q | FLOAT | 1.00.1–10 | BAND 3 Q FACTOR (Width) |
| enable_param_eq4 | BOOLEAN | false | ENABLE BAND 4 • Purpose: High parametric EQ band. |
| param_eq4_gain_db | FLOAT | 0.0-24–24 | BAND 4 GAIN (dB) |
| param_eq4_freq | FLOAT | 500020–22000 | BAND 4 FREQ (Hz) |
| param_eq4_q | FLOAT | 1.00.1–10 | BAND 4 Q FACTOR (Width) |
| enable_comp | BOOLEAN | false | ENABLE COMPRESSOR • Purpose: Reduce dynamic range. |
| comp_type | COMBO | Multiband | COMPRESSOR TYPE • Single: Affects entire signal evenly. • Multiband: Compresses Low/Mid/High independently. ⭐ Recommended: Multiband for mastering. |
| comp_threshold_db | FLOAT | -8.0-60–0 | SINGLE THRESHOLD (dB) |
| comp_ratio | FLOAT | 2.51–20 | SINGLE RATIO |
| comp_attack_ms | FLOAT | 20.00.1–1000 | SINGLE ATTACK (ms) |
| comp_release_ms | FLOAT | 2501–5000 | SINGLE RELEASE (ms) |
| comp_makeup_gain_db | FLOAT | 0.00–24 | SINGLE MAKEUP GAIN |
| mb_crossover_low_mid_hz | FLOAT | 25020–1000 | CROSSOVER: LOW-MID (Hz) |
| mb_crossover_mid_high_hz | FLOAT | 40001000–15000 | CROSSOVER: MID-HIGH (Hz) |
| mb_crossover_order | INT | 82–8 | CROSSOVER SLOPE |
| mb_low_threshold_db | FLOAT | -10.0-60–0 | LOW BAND THRESHOLD |
| mb_low_ratio | FLOAT | 3.01–20 | LOW BAND RATIO |
| mb_low_attack_ms | FLOAT | 30.00.1–1000 | LOW BAND ATTACK |
| mb_low_release_ms | FLOAT | 3001–5000 | LOW BAND RELEASE |
| mb_low_makeup_gain_db | FLOAT | 0.00–24 | LOW BAND MAKEUP |
| mb_mid_threshold_db | FLOAT | -8.0-60–0 | MID BAND THRESHOLD |
| mb_mid_ratio | FLOAT | 2.51–20 | MID BAND RATIO |
| mb_mid_attack_ms | FLOAT | 20.00.1–1000 | MID BAND ATTACK |
| mb_mid_release_ms | FLOAT | 1801–5000 | MID BAND RELEASE |
| mb_mid_makeup_gain_db | FLOAT | 0.00–24 | MID BAND MAKEUP |
| mb_high_threshold_db | FLOAT | -6.0-60–0 | HIGH BAND THRESHOLD |
| mb_high_ratio | FLOAT | 2.01–20 | HIGH BAND RATIO |
| mb_high_attack_ms | FLOAT | 10.00.1–1000 | HIGH BAND ATTACK |
| mb_high_release_ms | FLOAT | 1201–5000 | HIGH BAND RELEASE |
| mb_high_makeup_gain_db | FLOAT | 0.00–24 | HIGH BAND MAKEUP |
| enable_limiter | BOOLEAN | false | ENABLE LIMITER • Purpose: Brickwall limits audio peaks to prevent clipping. ⭐ Recommended: True (placed at the end of the chain). |
| limiter_ceiling_db | FLOAT | -0.1-10–0 | LIMITER CEILING • Purpose: Absolute maximum volume (dB). |
| limiter_release_ms | FLOAT | 501–2000 | LIMITER RELEASE • Purpose: Time to recover from limiting (ms). |
| debug_mode | COMBO | 0 - Silent | LOGGING VERBOSITY • Controls console output detail level. |
| enable_profiling | BOOLEAN | false | ENABLE PROFILING • Enable detailed DSP operation timing. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| waveform_before | IMAGE | — |
| waveform_after | IMAGE | — |