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.1.tar.gz (4.4 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.1-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: key_bpm_renamer-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 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.1.tar.gz
Algorithm Hash digest
SHA256 4f9dc8c57b4f3cfc5e168737566fa38ac2ca8dcfe546ee2f050331c7e42e720f
MD5 a9da2afc0d21e489fd4a642652e7e3ed
BLAKE2b-256 9d13097de3e9a0dd7779be588117f43151c9e0894f2384a47db52ae8772fa107

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for key_bpm_renamer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e0cc45857af313bda23f0d4a520fc5595ce2884ba7e583e3aa5ee15963548070
MD5 7f24d58484fb593c647a659da1e3055a
BLAKE2b-256 df5c0c4c6ce0e8ceaf3802e11d767b6fb793a4df8640135ae70634137afce74e

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