Skip to content

About

mp3 to flac and wav

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 music-maker

Local audio processing CLI in Rust Β· ITU-R BS.1770-4 loudness normalization Β· 3 modes, 1 tool

Release License Docs Platforms Rust

πŸ‡¨πŸ‡³ δΈ­ζ–‡ζ–‡ζ‘£


πŸ“Œ What is it

mp3 / wav β†’ DSP β†’ normalized master,** all in one command**.

Personal listening enhancement / streaming master / broadcast EBU R128 archive β€” the same binary, 3 modes.

Headphones need more "mastering vibe", uploads keep getting compressed, broadcast archives demand strict -23 LUFS β€” each problem needs its own tool. music-maker combines them into one:

  • βœ… Personal listening enhancement (harmonic excitation + stereo widening + transient shaping)
  • βœ… Streaming loudness normalization (EBU R128 standard)
  • βœ… Broadcast archive -23 LUFS strict master
  • βœ… Fully local processing, no cloud dependency, CPU-only pure Rust

⚑ Quick start (3 steps)

# 1. Download (macOS Apple Silicon example; other platforms below)
curl -L -o music-maker.tar.gz \
  https://github.com/SoftMeng/music-maker/releases/download/v0.2/music-maker-v0.2.0-aarch64-apple-darwin.tar.gz

# 2. Extract and use
tar xzf music-maker.tar.gz && cd music-maker-v0.2.0-aarch64-apple-darwin

# 3. Process your first track
./music-maker --input ~/Music/song.mp3
# β†’ Outputs song_enhanced.flac in the same directory

Tip

99% of users want streaming mode: auto-normalize loudness before uploading to Spotify / Apple Music / NetEase.

./music-maker streaming --input song.mp3

🎯 Three modes, pick by use case

Mode Use case Example
enhance (default) 🎧 Personal headphones / car audio β€” adds harmonic excitation + widening + transient shaping for "mastering vibe" music-maker --input song.mp3
streaming 🎡 Upload to streaming platforms (Spotify / Apple Music / NetEase) β€” auto -14 LUFS normalization music-maker streaming --input song.mp3
broadcast πŸ“Ί Broadcast archive (EBU R128 strict -23 LUFS + true peak ≀ -1 dBTP) music-maker broadcast --input song.mp3

Warning

enhance alters the original spectrum (DSP stacking has a cost). For platform uploads, use streaming β€” it only normalizes loudness without changing the music itself.


πŸ”¬ Algorithm core: ITU-R BS.1770-4 standard

v0.2 implements the complete EBU R128 / ITU-R BS.1770-4 algorithm:

graph LR
    A[Raw PCM<br/>44.1 kHz] --> B[K-weighting<br/>Stage 1 high-shelf<br/>Stage 2 high-pass]
    B --> C[400 ms sliding window<br/>gated integration]
    C --> D{Relative gate<br/>median - 10 LU}
    D -->|pass| E[Compute target gain]
    D -->|reject| C
    E --> F[Apply gain]
    F --> G[Lookahead Limiter<br/>-1.0 dBFS]
    G --> H[4x polyphase<br/>ISP true peak]
    H --> I[Output FLAC / WAV]
Loading

Key features:

  • βœ… K-weighting filter (BS.1770-4 standard, libebur128 published coefficients)
  • βœ… EBU R128 gated integration (absolute gate -70 LUFS + relative gate median - 10 LU)
  • βœ… 4x polyphase sinc ISP true peak (ITU-R BS.1770-4 Annex 2)
  • βœ… Lookahead Limiter (5 ms lookahead, channel-linked)
  • βœ… Measured -22.49 LUFS vs target -23 LUFS, deviation -0.51 LU (within standard tolerance)

Note

Difference from ffmpeg loudnorm: music-maker strictly follows BS.1770-4 standard. ffmpeg ebur128 output has a +3.7 LU systematic deviation from BS.1770-4 standard (ffmpeg implementation detail).


πŸ“₯ Download

Note

All packages include the dual-license files (Apache-2.0 source + CC BY-4.0 docs + MPL-2.0 third-party notices).

Platform File Size
macOS Apple Silicon (M1/M2/M3) music-maker-v0.2.0-aarch64-apple-darwin.tar.gz 921 KB
macOS Intel music-maker-v0.2.0-x86_64-apple-darwin.tar.gz 968 KB
Linux x86_64 (any distro) music-maker-v0.2.0-x86_64-unknown-linux-musl.tar.gz 951 KB
Windows x64 music-maker-v0.2.0-x86_64-pc-windows-gnu.zip 1.4 MB
# Verify checksums
shasum -a 256 -c SHA256SUMS

Download from Releases.


πŸ› οΈ Build from source

Requires Rust 1.70+:

git clone https://github.com/SoftMeng/music-maker.git && cd music-maker
cargo build --release
./target/release/music-maker --input song.mp3

πŸ’‘ Common examples

Basic usage
# Default enhance: improve your track for headphones
music-maker --input song.mp3

# Upload to streaming platforms
music-maker streaming --input song.mp3

# Broadcast archive (strict -23 LUFS)
music-maker broadcast --input song.mp3
Trim trailing ads / silence
# Trim trailing 1.5 seconds
music-maker streaming --input song.mp3 --trim-end 1.5
Adjust enhancement intensity
# More pronounced "mastering vibe"
music-maker enhance --input song.mp3 --drive 0.5 --stereo-width 1.4

# Conservative (default drive=0.255)
music-maker enhance --input song.mp3 --drive 0.15
Output format
# FLAC (default, lossless compressed)
music-maker streaming --input song.mp3

# WAV (24-bit PCM, uncompressed)
music-maker streaming --input song.mp3 --format wav
Batch process a directory
for f in ~/Music/*.mp3; do
  music-maker streaming --input "$f"
done
v0.1 legacy compatibility
# Force v0.1 legacy RMS algorithm (equivalent to v0.1.1-patch output)
music-maker --v0.1-compat broadcast --input song.mp3

πŸŽ›οΈ All CLI options

music-maker [MODE] [OPTIONS]

Positional:
  MODE              enhance (default) | streaming | broadcast

Options:
  -i, --input <PATH>            Input MP3 / WAV
  -o, --output <PATH>           Output path (default: same dir as input)
  --drive <0.0~1.0>            Harmonic excitation intensity (enhance)
  --stereo-width <1.0~2.0>      M/S widening (enhance)
  --target-lufs <-30~0>         Target loudness (streaming / broadcast)
  --trim-end <0~36000>          Trim trailing seconds
  --format <flac|wav>           Output format (default: inferred from -o suffix)
  --v0.1-compat                 Force v0.1 behavior
  -h, --help                    Show help

πŸ“ System requirements

  • Platform: macOS 11+ / major Linux distros / Windows 10+
  • CPU: any (DSP is pure Rust CPU computation, no GPU required)
  • Memory: < 50 MB working set
  • Disk: binary < 1 MB
  • Optional: Rust 1.70+ (only for source build)

πŸ“œ License

This repository uses dual-license layered publishing:

Scope License Files
Source code / build artifacts Apache License 2.0 src/, Cargo.toml, Cargo.lock, Release binaries
Documentation CC BY-4.0 README.md, docs/
Third-party dependency (MPL-2.0) Mozilla Public License 2.0 symphonia (only its own source files)

MPL-2.0 copyleft note: MPL-2.0 is file-level copyleft. The original code under src/ is not affected by MPL-2.0 copyleft and remains Apache-2.0. MPL-2.0 only constrains the source files of symphonia itself. See LICENSE-MPL-2.0.


⚠️ Known limitations

  • enhance mode alters spectrum: for platform uploads use streaming (preserves the music itself)
  • broadcast strict -23 LUFS: low-loudness material gets boosted, may introduce slight distortion
  • ffmpeg ebur128 output has +3.7 LU systematic deviation from BS.1770-4: music-maker algorithm itself is precise per the standard, ffmpeg tool has its own implementation details

πŸ™ Acknowledgements

music-maker stands on the shoulders of these open-source giants:

  • symphonia (MPL-2.0) β€” pure Rust audio decoding
  • flacenc (Apache-2.0) β€” FLAC encoding
  • hound (Apache-2.0 / MIT) β€” WAV decoding

⭐ Star Β· πŸ“‹ Releases Β· πŸ“– Technical docs

Written in Rust Β· Algorithm based on ITU-R BS.1770-4 Β· Local-first

About

mp3 to flac and wav

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages