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

Uploaded Source

Built Distribution

beats_swing-0.1.4-py3-none-any.whl (8.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: beats_swing-0.1.4.tar.gz
  • Upload date:
  • Size: 17.8 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.4.tar.gz
Algorithm Hash digest
SHA256 65a4c4c3889e4a81f696c02a00a7a060ea6c1ec1a64093d889efaa3c3f8017e6
MD5 902b95652f63ba089d9f0f91fbdd4083
BLAKE2b-256 eaf74529d1a3449f54a56c8583ba7fca710071d86e2d6000d41c87c63195ed0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: beats_swing-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e3812ba4defdd7ee8ea66d65645755f2a669f584285dfe09482849c2084b028c
MD5 37e0a2f34b9a07ba9dc781598b90a721
BLAKE2b-256 79ac19cd002c8608f69b241d0cf579e04a18ad399f5621b00dbe614c0a824e80

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