MCPSERV.CLUB
Matchering

Matchering

Self-Hosted

Instant audio mastering by reference matching

Active(87)
2.3kstars
0views
Updated 3 days ago
Matchering screenshot 1
1 / 5

Overview

Discover what makes Matchering powerful

Matchering 2.0 is a self‑hostable, container‑ready audio matching and mastering engine written in **Python 3**. At its core it implements a signal‑processing pipeline that aligns the target track’s spectral envelope, loudness, and stereo characteristics with those of a reference track. The result is an output file that preserves the musical intent of the target while inheriting the sonic qualities—RMS, frequency response (FR), peak amplitude, and stereo width—of the reference. The project ships as a Docker image for quick deployment, a pure Python library for integration into custom workflows, and a ComfyUI node for visual‑programming enthusiasts.

Reference‑driven mastering

Open‑source algorithmic core

Extensible API

Containerized deployment

Overview

Matchering 2.0 is a self‑hostable, container‑ready audio matching and mastering engine written in Python 3. At its core it implements a signal‑processing pipeline that aligns the target track’s spectral envelope, loudness, and stereo characteristics with those of a reference track. The result is an output file that preserves the musical intent of the target while inheriting the sonic qualities—RMS, frequency response (FR), peak amplitude, and stereo width—of the reference. The project ships as a Docker image for quick deployment, a pure Python library for integration into custom workflows, and a ComfyUI node for visual‑programming enthusiasts.

Key Features

  • Reference‑driven mastering – accepts two WAV/FLAC files, computes a per‑frequency band mapping, and applies dynamic equalization + limiting to match the reference’s loudness curve.
  • Open‑source algorithmic core – reimplemented from MATLAB in Python, leveraging NumPy/SciPy for FFT‑based analysis and a custom Hyrax brickwall limiter.
  • Extensible API – exposes high‑level functions (match_tracks, process_audio) and low‑level hooks for custom filter design or post‑processing.
  • Containerized deployment – Dockerfile built on a lightweight Alpine/Python base, exposing HTTP endpoints for batch processing or CI pipelines.

Technical Stack

LayerTechnology
RuntimePython 3.10+, CPython interpreter
Signal ProcessingNumPy, SciPy (FFT, windowing), librosa (optional)
LimitingCustom Hyrax limiter (written in Cython for speed)
Web APIFastAPI + Uvicorn (asynchronous, minimal overhead)
ContainerDocker (Alpine 3.18 image), optional Compose for multi‑service setups
Testing & CIPyTest, GitHub Actions; linting with Black

The library itself is pure Python and can be imported into any project, while the web service wraps the same logic in REST endpoints (/match, /status). The Docker image pulls dependencies at build time, ensuring deterministic releases.

Deployment & Infrastructure

  • Self‑hosting – any host with Docker and a modern CPU (AVX2 recommended) can run the container. No GPU is required, but a 4‑core CPU yields ~30 % faster processing on typical 5‑minute tracks.
  • Scalability – stateless design allows horizontal scaling behind a load balancer. Each request can be queued in Celery if throughput needs grow.
  • Persistence – the service stores raw inputs and processed outputs in a local /data volume; users may mount an external filesystem or cloud bucket for large media libraries.
  • Monitoring – exposes Prometheus metrics (/metrics) and logs in JSON format, compatible with ELK or Loki stacks.

Integration & Extensibility

  • Plugins – the core exposes a plugins package where developers can drop custom Python modules that implement additional analysis (e.g., spectral centroid matching) or post‑processing (e.g., stereo widening).
  • Webhooks – the API can be configured to POST a JSON payload to an external URL upon completion, enabling CI/CD pipelines or notification services.
  • SDK – the Python library can be imported in Jupyter notebooks, PyTorch training loops, or any CI script. The public API is intentionally minimal to keep the surface small.
  • Community hooks – existing integrations include a ComfyUI node for visual workflow, and bindings in the UVR5 Desktop App.

Developer Experience

  • Documentation – the README, API docstrings, and example notebooks provide a clear entry point. Type hints are included for IDE auto‑completion.
  • Licensing – MIT license encourages commercial use without attribution requirements, while the open‑source stack (NumPy, SciPy) keeps dependency costs zero.
  • Community – active GitHub discussions and a Telegram support channel allow quick resolution of edge‑case bugs. The project is listed in Awesome Python, signaling community trust.
  • Testing – a comprehensive test suite covers unit and integration tests; CI ensures no regressions before release.

Use Cases

  1. Studio Automation – batch‑master an entire album by feeding a reference track of the desired sonic palette, saving manual DAW sessions.
  2. Streaming Platforms – integrate into a CI pipeline that automatically masters user‑uploaded tracks before publication.
  3. Educational Tools – expose the API in a Jupyter environment to teach signal‑processing concepts via real‑world audio examples.
  4. Plugin Development – build custom nodes for ComfyUI or other node‑based editors, leveraging Matchering’s core as a sub‑module.

Advantages Over Alternatives

CriterionMatchering 2.0Competitor (e.g., commercial mastering services)
Performance~10 % faster on CPU due to Cython limiter and optimized FFT loopsOften slower, relies on cloud GPUs
FlexibilityFull source code access; can tweak filters or add new metricsClosed‑source, limited configurability
LicensingMIT – free for commercial useSubscription or per‑use fees
Self‑hostedYes, DockerizedNo, web‑only
ExtensibilityPlugin API, webhook supportLimited SDKs

For developers who need deterministic,

Open SourceReady to get started?

Join the community and start self-hosting Matchering today