A Python application that normalizes both the volume and encoding parameters of audio files (MP3 and WAV) in a selected directory to match the loudest file.
This tool was specifically designed for digital scratch devices SC500 and SC1000 MK2, ensuring consistent audio levels across your samples and beats.
- Clean, modern GUI for easy interaction
- Scan and analyze audio files (MP3 and WAV) in a selected directory
- Detect loudness levels across all files
- Normalize all files to match both the loudness and encoding parameters of the loudest file
- Standardize sample rate, bit depth, and channels across all files
- Overwrite original files with their normalized versions
- Confirmation dialog before overwriting to prevent accidental data loss
- Real-time progress display during analysis and processing
- Automatic backup and recovery system for data safety
- Python 3.6 or higher
- Required Python packages (see requirements.txt):
- pydub
- numpy
- tkinter (usually comes with Python)
- Clone or download this repository
- Install the required dependencies:
pip install -r requirements.txt- Make sure you have ffmpeg installed on your system (required by pydub):
- Windows: Download from ffmpeg.org and add to PATH
- macOS: Install with Homebrew:
brew install ffmpeg - Linux: Install with your package manager, e.g.,
apt install ffmpeg
- Run the application:
python main.py- Click "Select Directory" to choose a folder containing audio files (MP3 and WAV)
- Click "Analyze Files" to scan and determine loudness levels
- Review the analysis results in the file list
- Click "Normalize Files" to adjust the volume of all files to match the loudest one
- Confirm the operation when prompted
The application uses the following process:
-
Analysis Phase:
- Loads each audio file (MP3 or WAV) using pydub
- Calculates the RMS (Root Mean Square) loudness for each file
- Identifies the loudest file to use as a reference
- Extracts encoding parameters (sample rate, channels, bit depth) from the reference file
-
Normalization Phase:
- Creates temporary backups of all files
- Calculates the gain needed for each file to match the reference loudness
- Applies the gain to normalize volume
- Converts each file to match the encoding parameters of the reference file
- Overwrites the original files with the normalized versions
- Provides recovery in case of errors
main.py: Entry point for the applicationgui.py: GUI implementation using tkinteraudio_processor.py: Audio analysis and normalization logicfile_manager.py: File operations and backup managementutils.py: Utility functions and logging setup
- Creates temporary backups before modifying any files
- Confirms with the user before overwriting files
- Automatically restores from backups if errors occur
- Detailed logging for troubleshooting
This project is open source and available under the MIT License.