Skip to main content

Determine the tempo of an mp3 song. Tweaked for swing music.

Project description

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.

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

beats_swing-0.1.5.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

beats_swing-0.1.5-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file beats_swing-0.1.5.tar.gz.

File metadata

  • Download URL: beats_swing-0.1.5.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for beats_swing-0.1.5.tar.gz
Algorithm Hash digest
SHA256 de0a0583132c08793c071123cfb7b49ce202280cb05459fe4b980e050fa28d36
MD5 ad74c7a19d3ba279e7764141608bce0a
BLAKE2b-256 ad59df77f3acb089533a7611aa2c966b4fb4101c54651436bad9f930299062fa

See more details on using hashes here.

File details

Details for the file beats_swing-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: beats_swing-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for beats_swing-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 534dc1f032962f9a6a514bc0f027c6c049beed5899b73a9fdfa85f710d19b5c7
MD5 6e1694efde303dca9a0da8a54809ef63
BLAKE2b-256 10b1e1134d7b2b03a96893e444fe1317f82d8941b7169bd9e3493268e8c52590

See more details on using hashes here.

Supported by

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