Skip to main content

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

Metadata

Release files for btrack-beat-tracker 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for btrack-beat-tracker 1.0.7
File Size Uploaded Provenance Actions
btrack_beat_tracker-1.0.7.tar.gz 141.2 kB Without provenance Details for btrack_beat_tracker-1.0.7.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for btrack-beat-tracker 1.0.7
File Actions
btrack_beat_tracker-1.0.7-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details for btrack_beat_tracker-1.0.7-cp314-cp314-macosx_15_0_arm64.whl
btrack_beat_tracker-1.0.7-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details for btrack_beat_tracker-1.0.7-cp313-cp313-macosx_15_0_arm64.whl
btrack_beat_tracker-1.0.7-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details for btrack_beat_tracker-1.0.7-cp312-cp312-macosx_15_0_arm64.whl
btrack_beat_tracker-1.0.7-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details for btrack_beat_tracker-1.0.7-cp311-cp311-macosx_15_0_arm64.whl

Total release size: 250.1 kB

Release files / btrack_beat_tracker-1.0.7.tar.gz

Download URL btrack_beat_tracker-1.0.7.tar.gz
Size 141.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d06007e10445e129a1e69781d8b89312ffa45db43b6391f65218eb56b8b435c5
BLAKE2b-256 checksum
How to use checksums
23a6931e9082823b896c2434ce6d4637784feb15b5d180328d36143ed949bf53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / btrack_beat_tracker-1.0.7-cp314-cp314-macosx_15_0_arm64.whl

Download URL btrack_beat_tracker-1.0.7-cp314-cp314-macosx_15_0_arm64.whl
Size 27.2 kB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
c7418020f5925a3ab8b643083dd8a5a61ae7c387a0260832f8c487ae1620570d
BLAKE2b-256 checksum
How to use checksums
64790e46a45d66596060ce6b574fedbe782a0dd70943e3baed4c693c8f7483f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / btrack_beat_tracker-1.0.7-cp313-cp313-macosx_15_0_arm64.whl

Download URL btrack_beat_tracker-1.0.7-cp313-cp313-macosx_15_0_arm64.whl
Size 27.2 kB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
14e4451cc7badb039e194f8ade404f4b774c28adf1dfc55330f1a186fee2093d
BLAKE2b-256 checksum
How to use checksums
2cf0c58bb54410c49d7564cb6ea7005997bf0b99cc141d7e79b0656c1e212011
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / btrack_beat_tracker-1.0.7-cp312-cp312-macosx_15_0_arm64.whl

Download URL btrack_beat_tracker-1.0.7-cp312-cp312-macosx_15_0_arm64.whl
Size 27.2 kB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
16855b55a45b963340431f5e851559d6191b23da7b2504b0d53aebc0b9b3cedf
BLAKE2b-256 checksum
How to use checksums
ccfcfab99a9ffd22d286b96226e7694a0a07db9489c7918aee81b1d6e0a398ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / btrack_beat_tracker-1.0.7-cp311-cp311-macosx_15_0_arm64.whl

Download URL btrack_beat_tracker-1.0.7-cp311-cp311-macosx_15_0_arm64.whl
Size 27.2 kB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
4ee07a9c047c62f057ed3990675609e21e09b856dbd11ef37ac9d9cb12af6707
BLAKE2b-256 checksum
How to use checksums
01e4fbb57e12e7d71f6d619ade0a940788a690796e159642465c4c03467bdcbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for btrack-beat-tracker 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.7 This release

5 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page