Skip to main content

Python bindings for the BTrack beat tracker

Project description

BTrack Python Module

Here you can find Python bindings for the BTrack beat tracker.

Full details of the working of the BTrack algorithm can be found in:

  • Musicians and Machines: Bridging the Semantic Gap in Live Performance, Chapter 3, A. M. Stark, PhD Thesis, Queen Mary, University of London, 2011.

  • Real-Time Beat-Synchronous Analysis of Musical Audio, A. M. Stark, M. E. P. Davies and M. D. Plumbley. In Proceedings of the 12th International Conference on Digital Audio Effects (DAFx-09), Como, Italy, September 1-4, 2009.

1. Installation via PyPI:

pip install btrack-beat-tracker

2. Usage

Import btrack

import btrack_beat_tracker as btrack

Use Case A: Track beats from audio

audioData must be a 1 dimensional numpy array of audio samples (i.e. in mono) at 44100Hz

beats = btrack.detect_beats (audioData)

beats will be the estimated beat times in seconds

Use Case B: Extract onset detection function

audioData must be a 1 dimensional numpy array of audio samples (i.e. in mono) at 44100Hz

odf = btrack.calculate_onset_detection_function (audioData)

Use Case C: detect beats from the onset detection function

The onset detection function is calculated as per Use Case B above

odf_beats = btrack.detect_beats_from_odf (odf)

3. Build locally

Prerequisites

  • Python 3.8+
  • CMake 3.15+
  • A C/C++ compiler
  • NumPy installed (pip install numpy)
  • libsamplerate

1) Clean any previous builds

python3 -m pip uninstall btrack_beat_tracker -y
rm -rf build/ dist/ \*.egg-info

2) Developer Quick Install

If you want to build and install the module directly for local development:

cd plugins/python-module
python3 -m pip install --force-reinstall .

4. License

Copyright (c) 2014 Queen Mary University of London

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

See the the main BTrack repository README for full licence details

https://github.com/adamstark/btrack

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

btrack_beat_tracker-1.0.7.tar.gz (141.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

btrack_beat_tracker-1.0.7-cp314-cp314-macosx_15_0_arm64.whl (27.2 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

btrack_beat_tracker-1.0.7-cp313-cp313-macosx_15_0_arm64.whl (27.2 kB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

btrack_beat_tracker-1.0.7-cp312-cp312-macosx_15_0_arm64.whl (27.2 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

btrack_beat_tracker-1.0.7-cp311-cp311-macosx_15_0_arm64.whl (27.2 kB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

File details

Details for the file btrack_beat_tracker-1.0.7.tar.gz.

File metadata

  • Download URL: btrack_beat_tracker-1.0.7.tar.gz
  • Upload date:
  • Size: 141.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for btrack_beat_tracker-1.0.7.tar.gz
Algorithm Hash digest
SHA256 d06007e10445e129a1e69781d8b89312ffa45db43b6391f65218eb56b8b435c5
MD5 d9d52f7d095ffdc10f115b37158e9e0b
BLAKE2b-256 23a6931e9082823b896c2434ce6d4637784feb15b5d180328d36143ed949bf53

See more details on using hashes here.

File details

Details for the file btrack_beat_tracker-1.0.7-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for btrack_beat_tracker-1.0.7-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c7418020f5925a3ab8b643083dd8a5a61ae7c387a0260832f8c487ae1620570d
MD5 3c5076e3ce9e1a5b09fe224d61152517
BLAKE2b-256 64790e46a45d66596060ce6b574fedbe782a0dd70943e3baed4c693c8f7483f0

See more details on using hashes here.

File details

Details for the file btrack_beat_tracker-1.0.7-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for btrack_beat_tracker-1.0.7-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 14e4451cc7badb039e194f8ade404f4b774c28adf1dfc55330f1a186fee2093d
MD5 afa5f99b748322ce34c60ea7dae19767
BLAKE2b-256 2cf0c58bb54410c49d7564cb6ea7005997bf0b99cc141d7e79b0656c1e212011

See more details on using hashes here.

File details

Details for the file btrack_beat_tracker-1.0.7-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for btrack_beat_tracker-1.0.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 16855b55a45b963340431f5e851559d6191b23da7b2504b0d53aebc0b9b3cedf
MD5 3654b3c9b9b9d7762fe531fa136c738c
BLAKE2b-256 ccfcfab99a9ffd22d286b96226e7694a0a07db9489c7918aee81b1d6e0a398ab

See more details on using hashes here.

File details

Details for the file btrack_beat_tracker-1.0.7-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for btrack_beat_tracker-1.0.7-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4ee07a9c047c62f057ed3990675609e21e09b856dbd11ef37ac9d9cb12af6707
MD5 422331b32a79eee8dcc3db3378371a73
BLAKE2b-256 01e4fbb57e12e7d71f6d619ade0a940788a690796e159642465c4c03467bdcbf

See more details on using hashes here.

Supported by

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