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.2.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

beats_swing-0.1.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for beats_swing-0.1.2.tar.gz
Algorithm Hash digest
SHA256 aec0b2c889eef8c23306e67a4378c54b788fb25b82d17a2993169d74786d73cd
MD5 c97e1ae024e50aaf68d24b0a378b52bf
BLAKE2b-256 ea98a84f66d0289a5842c9b45a5fdae4b8b72a46a1d53f4b4e77d23feebc7729

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for beats_swing-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2c29dd778799feba1152eff4fb0e9cfecc5fd9a9e93bf72ec5ad19125bc8aa9c
MD5 95c58fb73e2a04ce3a130364b85886ac
BLAKE2b-256 4868ea3b183d22c859f27d9315bed88bf9741554c26b77dc0af53a45be94f673

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