adamstark@0: BTrack - A Real-Time Beat Tracker adamstark@0: ================================= adamstark@0: adamstark@33: ** Version 1.0.0 ** adamstark@7: adamstark@7: *by Adam Stark, Matthew Davies and Mark Plumbley.* adamstark@7: adamstark@7: adamstark@7: About BTrack adamstark@7: ------------ adamstark@7: adamstark@30: BTrack is a causal beat tracking algorithm intended for real-time use. It is implemented in C++ with wrappers for Python and the Vamp plug-in framework. adamstark@7: adamstark@7: Full details of the working of the algorithm can be found in: adamstark@7: adamstark@7: * Musicians and Machines: Bridging the Semantic Gap in Live Performance, Chapter 3, A. M. Stark, PhD Thesis, Queen Mary, University of London, 2011. adamstark@7: adamstark@7: * 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. adamstark@7: adamstark@7: adamstark@8: Versions adamstark@8: -------- adamstark@8: adamstark@33: ==== 1.0.0 ==== (8th July 2014) adamstark@33: adamstark@33: * Many updates to stability and improvements to implementation adamstark@33: adamstark@33: ==== 0.9.0 ==== (circa 2008/2009) adamstark@8: adamstark@8: * This is the original version of the BTrack algorithm adamstark@8: adamstark@8: adamstark@8: adamstark@7: License adamstark@7: ------- adamstark@7: adamstark@24: BTrack is made available under the GNU General Public License, version 3. Please see the included LICENSE.txt for more details. adamstark@24: adamstark@24: Usage - C++ adamstark@24: ----------- adamstark@24: adamstark@24: **STEP 1** adamstark@24: adamstark@24: Include the BTrack header file as follows: adamstark@24: adamstark@24: #include "BTrack.h" adamstark@24: adamstark@24: **STEP 2** adamstark@24: adamstark@24: Instantiate the algorithm by one of the following: adamstark@24: adamstark@24: // to use the default 512 hop size and 1024 frame size adamstark@24: BTrack b; adamstark@24: adamstark@24: or: adamstark@24: adamstark@24: // to specify a hop size (e.g. 512) and have a frame size of 2 x the hop size adamstark@24: BTrack b(512); adamstark@24: adamstark@24: or: adamstark@24: adamstark@24: // to specify both the hop size and frame size adamstark@24: BTrack b(512,1024); adamstark@24: adamstark@24: **STEP 3.1 - Audio Input** adamstark@24: adamstark@24: In the processing loop, fill a double precision array with one frame of audio samples (as determined in step 2): adamstark@24: adamstark@24: double *frame; adamstark@24: adamstark@24: // ! adamstark@24: // do something here to fill the frame with audio samples adamstark@24: // ! adamstark@24: adamstark@24: and then call: adamstark@24: adamstark@24: b.processAudioFrame(frame); adamstark@24: adamstark@24: and to check for beats, simply call: adamstark@24: adamstark@24: if (b.beatDueInCurrentFrame()) adamstark@24: { adamstark@24: // do something on the beat adamstark@24: } adamstark@24: adamstark@24: **STEP 3.2 - Onset Detection Function Input** adamstark@24: adamstark@24: The algorithm can process onset detection function samples. Given a double precision onset detection function sample called 'newSamples', at each step, call: adamstark@24: adamstark@24: b.processOnsetDetectionFunctionSample(newSample); adamstark@24: adamstark@24: and then check for beats with: adamstark@24: adamstark@24: if (b.beatDueInCurrentFrame()) adamstark@24: { adamstark@24: // do something on the beat adamstark@24: } adamstark@33: adamstark@33: adamstark@33: License adamstark@33: ------- adamstark@33: adamstark@33: Copyright (c) 2014 Queen Mary University of London adamstark@33: adamstark@33: This program is free software: you can redistribute it and/or modify adamstark@33: it under the terms of the GNU General Public License as published by adamstark@33: the Free Software Foundation, either version 3 of the License, or adamstark@33: (at your option) any later version. adamstark@33: adamstark@33: This program is distributed in the hope that it will be useful, adamstark@33: but WITHOUT ANY WARRANTY; without even the implied warranty of adamstark@33: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the adamstark@33: GNU General Public License for more details. adamstark@33: adamstark@33: You should have received a copy of the GNU General Public License adamstark@33: along with this program. If not, see .