Nodes/ComfyUI-Matchering/Matchering (Advanced)
ComfyUI Node

Matchering (Advanced)

Matchering, with the hood open and every knob exposed

By MuziekMagie·Created 2 years ago·Updated 2 years ago· 63
Matchering (Advanced)
  • target
  • reference
  • limiter_config
  • Result
  • Result (no limiter)
  • Result (no limiter, normalized)
internal_sample_rate44100
max_length900
max_piece_size15
threshold1
min_value0.0000
fft_size4096
lin_log_oversampling4
rms_correction_steps4
clipping_samples_threshold8
limited_samples_threshold128
allow_equalityfalse
lowess_frac0.0375
lowess_it0
lowess_delta0.001

MatcheringAdvanced is the sibling of the plain Matchering node, and it does exactly what the name says: same audio-matching engine, but every internal setting of the underlying sergree/matchering library is exposed as a widget. If you've ever wanted to match a track's loudness and frequency balance to a reference and have opinions about the FFT size while doing it, this is your node.

Here's the important part though: every default is the library author's carefully tuned value. You can run this node without touching a single widget and get exactly the same result as the basic node. The defaults are not placeholders - they're the ones the matchering library ships and tests against. So don't treat the parameter explosion as an invitation to twist everything; treat it as a handful of specific knobs that exist for specific problems.

How it works

The engine is identical to the basic node's: match RMS loudness to the reference, EQ the target's frequency balance toward the reference (in mid/side), run a few RMS-correction passes, then hit it with a brickwall limiter. Internally everything is resampled to the internal_sample_rate and mono is upconverted to stereo. What differs here is that you can reach into every stage.

The inputs that actually matter

You feed the same two AUDIO inputs - target (what you're remastering) and reference (what you want it to sound like). Of the fifteen config widgets, a beginner realistically touches these:

  • internal_sample_rate (default 44100) - the rate all processing happens at. Crank it for theoretically better high-end; in practice 44.1 kHz is plenty and going higher just costs CPU.
  • max_length (default 900) - the maximum track length in seconds. This is the escape hatch for the basic node's "file too long" error: set it above your track's duration.
  • allow_equality (default off) - normally the node refuses to run if target and reference are (near-)identical. Flip this on to match a track against itself, which is how you'd do a clean single-track remaster.
  • threshold (default 0.9981) - the limiter's ceiling, just below full scale so you don't clip on intersample peaks. Leave it alone unless you know why you're moving it.
  • max_piece_size (default 15) - how long a section (in seconds) the loudness analyzer processes at once; lower values give finer, more local level matching.

The rest - fft_size, lin_log_oversampling, rms_correction_steps, the clipping_samples_threshold / limited_samples_threshold warning triggers, the lowess_frac / lowess_it / lowess_delta EQ-smoothing trio - are deep-library settings. If you don't have a reason to change them, you don't need to.

There's also one optional input: limiter_config, of type MATCHERING_LIMITER_CONFIG. That's where the sibling Matchering Limiter Config node plugs in - build custom limiter settings there, wire them here, and this node uses yours instead of the built-in limiter.

Outputs

Identical to the basic node: Result (full matched + limited chain - save this one), Result (no limiter), and Result (no limiter, normalized). All AUDIO, all ready to feed a save or playback node.

Installing it

Same as the pack: Manager → search "Matchering" → install, then restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/MuziekMagie/ComfyUI-Matchering
# restart ComfyUI

Dependencies (numpy, scipy, soundfile, resampy, statsmodels) install automatically. No models, no weights.

Common issues

Most of the failure modes are the library's validation surfacing through the console: files longer than max_length error out, audio with more than two channels is rejected, and near-identical target/reference files trigger the equality guard (that's the allow_equality flag). The traps here are self-inflicted: setting internal_sample_rate to 192000 "for quality" and watching a 10-minute track take forever, or dropping max_piece_size so low the loudness matching gets twitchy and pumpy. If something sounds wrong, the first debugging step is resetting the widgets to defaults - the stock values genuinely are the ones the library was built around.

Categoryaudio/matchering

Inputs (17)

NameTypeDefaultDescription
targetAUDIO
referenceAUDIO
internal_sample_rateINT441000–192000
max_lengthFLOAT900
max_piece_sizeFLOAT15
thresholdFLOAT1
min_valueFLOAT0.00000–0.1
fft_sizeINT4096
lin_log_oversamplingINT4
rms_correction_stepsINT4
clipping_samples_thresholdINT8
limited_samples_thresholdINT128
allow_equalityBOOLEANfalse
lowess_fracFLOAT0.0375
lowess_itINT0
lowess_deltaFLOAT0.001
limiter_configoptMATCHERING_LIMITER_CONFIG

Outputs (3)

NameTypeDescription
ResultAUDIO
Result (no limiter)AUDIO
Result (no limiter, normalized)AUDIO