Skip to main content

A tool to rename audio files based on their key and BPM

Project description

Key BPM Renamer

key_bpm_renamer is a Python command-line tool that automatically analyzes audio files (MP3, WAV, FLAC), extracts the musical key and beats per minute (BPM), renames the files with this information, and embeds the key and BPM into the metadata (for MP3 files).

Features

  • Extracts the musical key and BPM from audio files.
  • Renames the audio files by appending the detected key and BPM.
  • Embeds the key and BPM in the metadata of MP3 files (using eyed3).
  • Supports MP3, WAV, and FLAC audio formats.
  • Works with directories and preserves folder structure.

Installation

To install key_bpm_renamer, you can use pip:

pip install key_bpm_renamer

Usage

After installing the dependencies, you can use the key_bpm_renamer command to process your audio files.

Command Structure

key_bpm_renamer -i <input_directory> -o <output_directory>

-i <input_directory>: The path to the directory containing the audio files you want to process. -o <output_directory>: The path to the directory where the renamed audio files will be saved.

Example

key_bpm_renamer -i ./input_audio_files -o ./output_audio_files

This command will:

  1. Analyze all the audio files in the input_audio_files directory.
  2. Detect the key and BPM of each file.
  3. Rename the files with the format <original_filename>_<key>_<bpm>bpm.<extension>.
  4. Save the renamed files in the output_audio_files directory.
  5. Embed the detected key and BPM into the metadata of each audio file.

Notes

  • Supported audio formats: .mp3, .wav, .flac
  • The key will be extracted using Essentia’s KeyExtractor and the BPM using RhythmExtractor.
  • Files are copied (not moved), so the original files remain untouched.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

key_bpm_renamer-0.1.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

key_bpm_renamer-0.1.2-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file key_bpm_renamer-0.1.2.tar.gz.

File metadata

  • Download URL: key_bpm_renamer-0.1.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for key_bpm_renamer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4eb3e6e6ffb8ba87f8b247b2ad96292f508d9f707a155d5187c5a37aebff69c9
MD5 c1b3b1b84a7f77778be2812a25918c23
BLAKE2b-256 76466fabec55be5075a271a1b935ad97feb5481fd51d4dc15f7dc564c10c7356

See more details on using hashes here.

File details

Details for the file key_bpm_renamer-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for key_bpm_renamer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb1e8f14d7698e31012ac790c2d83819ddca864fc6985c60a4c57d77e2d6eb75
MD5 417eadd0799dc33d758ef75e0a4b8f96
BLAKE2b-256 1965795624167c606f7ae333a7842a431287462f1f409730f88158cc9968e632

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page