elvijs / beats

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

beats

tests pre-commit Black

What is it?

Determine the tempo of a song from its mp3. Designed for swing music. May work in other cases as well.

This is essentially a thin wrapper on top of the amazing librosa library.

Estimating tempo of songs

Install

Ensure you have the ffmpeg system-level package installed via e.g.

$ sudo apt install ffmpeg

Then install the package (in a Python virtual environment) via

$ pip install beats-swing

Usage

The main entrypoint is the CLI script beats:

(venv) user@computer:~$ beats -f data/sample.mp3
172

Alternatively, use the package directly in Python via the Estimator interface implementations.

Caveats

  • Supported formats: mp3, m4a.
  • This package is the simplest possible solution to estimating the tempo of swing songs and has been tweaked against a small sample of songs. If you find cases where it does a particularly bad job, please raise an issue and upload the relevant audio file.
    • If you want to extend it in any way, please read the algorithm development guidelines on DEVELOPMENT.md.

Issues

Please raise here.

Credits

This project was generated from @elvijs's Minimal Python Cookiecutter template.

About

License:MIT License


Languages

Language:Python 96.9%Language:Makefile 3.1%