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.6.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.6-cp314-cp314-macosx_15_0_arm64.whl (27.2 kB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

btrack_beat_tracker-1.0.6-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.6.tar.gz.

File metadata

  • Download URL: btrack_beat_tracker-1.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 a32c5ec2220e8d528dd87c6b733289f1a6bacaabc77659ce663a4b573dc3bb45
MD5 df7829fd68b96cde8f86b0eff1e56bca
BLAKE2b-256 a3bb49948a542e54e57e90ab32404d236b91717c2a8b68a164b37316bf742cbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for btrack_beat_tracker-1.0.6-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 04e218d450b8bc544369fb7e7992fec41c56179de2e29bca75a83b51de12d63e
MD5 8c469e4d6ddd1bc10d2adefe25bd7ab6
BLAKE2b-256 a74f55f474edf10de0470839732a95f16af50f46be6cfca5592b5fe60805aa55

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for btrack_beat_tracker-1.0.6-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 2d65e170aa00b5cb608a55f74084befd60464f1c8f120735a01f6bcfcb5442ce
MD5 525dafbb5fe35a84e0215d8e96c59a46
BLAKE2b-256 b9cffddb533466d01154789deb3b8ebbf0a16f57158e1af504fad8567a552d02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for btrack_beat_tracker-1.0.6-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a1c728985425bdcd0bf682b4f0cca0ae92eb0e591f5797c109f13566444096ff
MD5 e93d6e42d00ca4adb4354c1e15eea29e
BLAKE2b-256 1688115650f0d60ecb17b5440478007dfddace3cf526427edeff04106971f263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for btrack_beat_tracker-1.0.6-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b9fe3bbde5931e3484631db42d0dc3be4dbae8a37b02d4b3dae00ef6f4b50b10
MD5 a4387cc99960e6925ca40a12841346bf
BLAKE2b-256 3cb1b97c45cc754b292522f1077eb4fc3aeb2a77746a30cd8d79e18e1969338e

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