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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: beats_swing-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 c636e4eaf6e930fbe6ad83bad0df219295395e0bd099c35fc6ac3b9e0edba142
MD5 7820d4ca000a7f5f9205d82e4cdfac99
BLAKE2b-256 6bf5ab51e1aa73687c7d26cce399716306d5bb3df5e1bfc594dbdbb1a4dc459a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beats_swing-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 608855e96a4262f320a46de71171fd2466ef0e14a655e7cadbf90863572ffb02
MD5 533c6269574a9c1e448939b3915e6340
BLAKE2b-256 e1cecf69166df51e115d80895e37fd6e102a6e90f3da4bc9f48bec3b1f222efd

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