
Why didn't anyone tackle it? ― Vibe coding breaks 15 years of silence
This page has been translated by machine translation. View original
I'm Shiga from Berlin. I work as a DJ.
Yesterday, I published an article on Zenn about "headroom," a loudness optimization tool I developed for DJ tracks. It's a tool that solves the volume differences between tracks that occur when exporting from Rekordbox to CDJ via USB, as the Auto Gain function doesn't work in that process.
During development, I needed to depend on an old tool called mp3gain for lossless gain adjustment of MP3 files. While researching this tool, I realized something:
This tool has not been maintained for over 15 years. Despite this, it still gets downloaded more than 1,000 times per week on SourceForge.
Something had to be done. With Claude's help, I decided to resurrect this tool for the modern era.
What is mp3gain?
mp3gain is a tool that can adjust the volume of MP3 files losslessly. The key point is "lossless," meaning it can change the volume without re-encoding.
In the MP3 format, there's an 8-bit field called global_gain in the side information of each frame. mp3gain directly modifies this field to adjust volume without touching any audio data.
| Characteristic | Value |
|---|---|
| global_gain bit width | 8 bits (0-255) |
| Change per step | 1.5 dB |
| Formula | 2^(gain/4) |
This mechanism is based on the MP3 format specification itself, so adjustments are always in 1.5dB increments regardless of the tool used. This is a constraint of the format.
Abandoned tool, still being used
Looking at mp3gain's SourceForge page, the last news update was in September 2018, which was just "Updated Brazilian Portuguese translation." Actual feature development stopped around 2009.
Wikipedia had a shocking statement:
In 2015 Debian and Ubuntu removed it from their repositories due to a lack of an active maintainer.
Still, mp3gain continues to be used.
| Platform | Usage |
|---|---|
| SourceForge | 1,000+ downloads per week |
| Homebrew | 320 installs per year |
| Windows | Many reports of not working on Windows 11 |
There's demand. But no one is maintaining it. This has been going on for over 15 years.
Dependency issues in headroom development
When adding MP3 support to headroom, I needed to depend on mp3gain. While FLAC and AIFF can be precisely adjusted with ffmpeg's volume filter, MP3 requires mp3gain's approach for lossless adjustment.
However, I was concerned about depending on an unmaintained C library:
- No security patches
- No support for new OSes or architectures
- No one to fix bugs when found
So I consulted Claude.
"I'm currently using mp3gain for MP3 global gain header manipulation, but do I really need an external dependency just for header operations? If this operation is simple, shouldn't I aim to eliminate dependency on an unmaintained library?"
Claude's response was clear:
"You should aim to eliminate the dependency. The global_gain operation itself is simple, just adding/subtracting an 8-bit integer. The difficult part is analyzing MP3 frames, but this can be implemented by understanding the specification."
Decoding specifications with Claude
This is where Vibe coding truly shines.
I chose not to port mp3gain's C source code. Instead, I decided to rebuild the calculation logic from scratch by studying ISO 11172-3 (MPEG Audio Layer III specification) with Claude. This is known as clean-room reverse engineering.
Claude identified the MP3 frame structure from search results:
Side Information structure (per granule):
Part2_3_length: 12 bits
Big_values: 9 bits
GlobalGain: 8 bits ← This is what we modify
ScalefacCompress: 4 bits
...
The challenge was that the global_gain field crosses byte boundaries, requiring bit-level reading and writing rather than simple byte operations.
It gets more complex because the side information size varies depending on the combination of MPEG1/2/2.5 and stereo/mono:
| MPEG Version | Channel Mode | Side Info Size |
|---|---|---|
| MPEG1 | Mono | 17 bytes |
| MPEG1 | Stereo | 32 bytes |
| MPEG2/2.5 | Mono | 9 bytes |
| MPEG2/2.5 | Stereo | 17 bytes |
Claude organized these conditional branches and generated 568 lines of Rust implementation. The code handles ID3v2 tag skipping, frame synchronization detection, and non-aligned bit access.
The birth of mp3rgain
After successfully integrating it into headroom, I decided to publish this implementation as an independent tool called mp3rgain.
# Installation
brew tap M-Igashi/tap
brew install mp3rgain
# Usage examples
mp3rgain apply -g 2 song.mp3 # +2 steps (+3.0 dB)
mp3rgain info song.mp3 # Display gain info
mp3rgain undo -g 2 song.mp3 # Revert changes
The main differences from mp3gain are:
| Characteristic | mp3gain | mp3rgain |
|---|---|---|
| Language | C | Rust |
| External dependencies | mpg123 | None |
| Memory safety | Manual management | Language guarantee |
| Last update | Around 2009 | 2026 (ongoing) |
| Library API | None | Available |
The significance of Vibe coding
What I strongly felt from this experience is that no one would have taken this action without Claude.
mp3gain was left abandoned for 15 years. Despite clear demand, nobody touched it. Why?
Because the cost and return didn't match up.
Decoding ISO 11172-3 specifications, implementing bit-level frame analysis, and testing all edge cases is a lot of work, just to get "the same functionality as an existing tool." It's too high a barrier for a hobby project, and there's no business return.
But with Claude and Vibe coding, this equation changes:
- Decoding specifications → Claude searches, summarizes, and explains
- Implementation generation → Claude outputs 568 lines of Rust code
- Debugging → Claude analyzes error messages and suggests fixes
All I did was make the decision to "solve this problem" and verify/integrate Claude's output.
This means the cost of converting ideas into implementation has dramatically decreased. Countless projects and tools that were previously deemed "interesting but not worth building" or "concerning to use but not worth recreating" are now within reach.
Aiming for official Homebrew adoption
Currently, mp3rgain is aiming for adoption as an official Homebrew formula. I want to contribute to the community by providing a modern alternative to mp3gain.
Repository: https://github.com/M-Igashi/mp3rgain
Reviving an open-source project abandoned for 15 years. This became possible with Vibe coding. I believe this suggests new possibilities for the open-source ecosystem beyond just technical achievements.

