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.
pip install btrack-beat-tracker
import btrack_beat_tracker as btrack
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
audioData must be a 1 dimensional numpy array of audio samples (i.e. in mono) at 44100Hz
odf = btrack.calculate_onset_detection_function (audioData)
The onset detection function is calculated as per Use Case B above
odf_beats = btrack.detect_beats_from_odf (odf)
- Python 3.8+
- CMake 3.15+
- A C/C++ compiler
- NumPy installed (
pip install numpy) libsamplerate
python3 -m pip uninstall btrack_beat_tracker -y
rm -rf build/ dist/ \*.egg-info
If you want to build and install the module directly for local development:
cd plugins/python-module
python3 -m pip install --force-reinstall .
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