Nodes/MD Nodes/MD: Mastering Chain (Full)
ComfyUI Node

MD: Mastering Chain (Full)

A whole mastering suite in one node

By MDMAchine·Created about a year ago·Updated 3 months ago· 15
MD: Mastering Chain (Full)
  • audio
  • audio
  • waveform_before
  • waveform_after
sample_rate44100
master_gain_db0.0
enable_lowpassfalse
lowpass_freq18000
lowpass_order4
enable_highpassfalse
highpass_freq20
highpass_order4
eq_high_shelf_gain_db0.0
eq_high_shelf_freq12000
enable_low_shelf_eqfalse
eq_low_shelf_gain_db0.0
eq_low_shelf_freq75
enable_param_eq1false
param_eq1_gain_db0.0
param_eq1_freq55
param_eq1_q2.0
enable_param_eq2false
param_eq2_gain_db0.0
param_eq2_freq125
param_eq2_q2.0
enable_param_eq3false
param_eq3_gain_db0.0
param_eq3_freq1250
param_eq3_q1.0
enable_param_eq4false
param_eq4_gain_db0.0
param_eq4_freq5000
param_eq4_q1.0
enable_compfalse
comp_typeMultiband
comp_threshold_db-8.0
comp_ratio2.5
comp_attack_ms20.0
comp_release_ms250
comp_makeup_gain_db0.0
mb_crossover_low_mid_hz250
mb_crossover_mid_high_hz4000
mb_crossover_order8
mb_low_threshold_db-10.0
mb_low_ratio3.0
mb_low_attack_ms30.0
mb_low_release_ms300
mb_low_makeup_gain_db0.0
mb_mid_threshold_db-8.0
mb_mid_ratio2.5
mb_mid_attack_ms20.0
mb_mid_release_ms180
mb_mid_makeup_gain_db0.0
mb_high_threshold_db-6.0
mb_high_ratio2.0
mb_high_attack_ms10.0
mb_high_release_ms120
mb_high_makeup_gain_db0.0
enable_limiterfalse
limiter_ceiling_db-0.1
limiter_release_ms50
debug_mode0 - Silent
enable_profilingfalse

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_highpass with highpass_freq around 30Hz kills sub-mud; the lowpass (default off, 18kHz) trims harsh top end. *_order sets filter steepness.
  • EQ - a eq_high_shelf for 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_comp toggles it. comp_type is 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_db at -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.

CategoryMD_Nodes/Audio Processing

Inputs (60)

NameTypeDefaultDescription
audioAUDIOAUDIO INPUT • Purpose: Raw audio waveform to be mastered. • Range: [Batch, Channels, Samples]. • Output: Mastered audio dictionary.
sample_rateINT441008000–192000SAMPLE RATE • Purpose: Fallback sample rate if not provided by audio dict.
master_gain_dbFLOAT0.0-60–24MASTER GAIN (DB) • Purpose: Input gain adjustment before processing. • Range: -60dB to +24dB. ⭐ Recommended: 0.0 unless audio is exceptionally quiet.
enable_lowpassBOOLEANfalseENABLE LOWPASS • Purpose: Attenuate frequencies above the lowpass_freq.
lowpass_freqFLOAT1800020–22000LOWPASS FREQUENCY • Purpose: The cutoff frequency in Hz.
lowpass_orderINT41–8LOWPASS SLOPE • Purpose: Sharpness of the cut (Higher = steeper).
enable_highpassBOOLEANfalseENABLE HIGHPASS • Purpose: Attenuate sub-frequencies below highpass_freq.
highpass_freqFLOAT2010–1000HIGHPASS FREQUENCY • Purpose: The cutoff frequency in Hz. ⭐ Recommended: 30Hz to remove sub-mud.
highpass_orderINT41–8HIGHPASS SLOPE • Purpose: Sharpness of the cut.
eq_high_shelf_gain_dbFLOAT0.0-24–24HIGH SHELF GAIN • Purpose: Boost/cut high frequencies (dB).
eq_high_shelf_freqFLOAT120001000–22000HIGH SHELF FREQUENCY • Purpose: Start point of the shelf (Hz).
enable_low_shelf_eqBOOLEANfalseENABLE LOW SHELF • Purpose: Toggle low frequency shelf filter.
eq_low_shelf_gain_dbFLOAT0.0-24–24LOW SHELF GAIN • Purpose: Boost/cut low frequencies (dB).
eq_low_shelf_freqFLOAT7520–1000LOW SHELF FREQUENCY • Purpose: Start point of the shelf (Hz).
enable_param_eq1BOOLEANfalseENABLE BAND 1 • Purpose: Low-Mid parametric EQ band.
param_eq1_gain_dbFLOAT0.0-24–24BAND 1 GAIN (dB)
param_eq1_freqFLOAT5520–22000BAND 1 FREQ (Hz)
param_eq1_qFLOAT2.00.1–10BAND 1 Q FACTOR (Width)
enable_param_eq2BOOLEANfalseENABLE BAND 2 • Purpose: Mid parametric EQ band.
param_eq2_gain_dbFLOAT0.0-24–24BAND 2 GAIN (dB)
param_eq2_freqFLOAT12520–22000BAND 2 FREQ (Hz)
param_eq2_qFLOAT2.00.1–10BAND 2 Q FACTOR (Width)
enable_param_eq3BOOLEANfalseENABLE BAND 3 • Purpose: High-Mid parametric EQ band.
param_eq3_gain_dbFLOAT0.0-24–24BAND 3 GAIN (dB)
param_eq3_freqFLOAT125020–22000BAND 3 FREQ (Hz)
param_eq3_qFLOAT1.00.1–10BAND 3 Q FACTOR (Width)
enable_param_eq4BOOLEANfalseENABLE BAND 4 • Purpose: High parametric EQ band.
param_eq4_gain_dbFLOAT0.0-24–24BAND 4 GAIN (dB)
param_eq4_freqFLOAT500020–22000BAND 4 FREQ (Hz)
param_eq4_qFLOAT1.00.1–10BAND 4 Q FACTOR (Width)
enable_compBOOLEANfalseENABLE COMPRESSOR • Purpose: Reduce dynamic range.
comp_typeCOMBOMultibandCOMPRESSOR TYPE • Single: Affects entire signal evenly. • Multiband: Compresses Low/Mid/High independently. ⭐ Recommended: Multiband for mastering.
comp_threshold_dbFLOAT-8.0-60–0SINGLE THRESHOLD (dB)
comp_ratioFLOAT2.51–20SINGLE RATIO
comp_attack_msFLOAT20.00.1–1000SINGLE ATTACK (ms)
comp_release_msFLOAT2501–5000SINGLE RELEASE (ms)
comp_makeup_gain_dbFLOAT0.00–24SINGLE MAKEUP GAIN
mb_crossover_low_mid_hzFLOAT25020–1000CROSSOVER: LOW-MID (Hz)
mb_crossover_mid_high_hzFLOAT40001000–15000CROSSOVER: MID-HIGH (Hz)
mb_crossover_orderINT82–8CROSSOVER SLOPE
mb_low_threshold_dbFLOAT-10.0-60–0LOW BAND THRESHOLD
mb_low_ratioFLOAT3.01–20LOW BAND RATIO
mb_low_attack_msFLOAT30.00.1–1000LOW BAND ATTACK
mb_low_release_msFLOAT3001–5000LOW BAND RELEASE
mb_low_makeup_gain_dbFLOAT0.00–24LOW BAND MAKEUP
mb_mid_threshold_dbFLOAT-8.0-60–0MID BAND THRESHOLD
mb_mid_ratioFLOAT2.51–20MID BAND RATIO
mb_mid_attack_msFLOAT20.00.1–1000MID BAND ATTACK
mb_mid_release_msFLOAT1801–5000MID BAND RELEASE
mb_mid_makeup_gain_dbFLOAT0.00–24MID BAND MAKEUP
mb_high_threshold_dbFLOAT-6.0-60–0HIGH BAND THRESHOLD
mb_high_ratioFLOAT2.01–20HIGH BAND RATIO
mb_high_attack_msFLOAT10.00.1–1000HIGH BAND ATTACK
mb_high_release_msFLOAT1201–5000HIGH BAND RELEASE
mb_high_makeup_gain_dbFLOAT0.00–24HIGH BAND MAKEUP
enable_limiterBOOLEANfalseENABLE LIMITER • Purpose: Brickwall limits audio peaks to prevent clipping. ⭐ Recommended: True (placed at the end of the chain).
limiter_ceiling_dbFLOAT-0.1-10–0LIMITER CEILING • Purpose: Absolute maximum volume (dB).
limiter_release_msFLOAT501–2000LIMITER RELEASE • Purpose: Time to recover from limiting (ms).
debug_modeCOMBO0 - SilentLOGGING VERBOSITY • Controls console output detail level.
enable_profilingBOOLEANfalseENABLE PROFILING • Enable detailed DSP operation timing.

Outputs (3)

NameTypeDescription
audioAUDIO
waveform_beforeIMAGE
waveform_afterIMAGE