annotate README.md @ 67:ae3ec9b14092

Updated README, installation instructions for Python module and added an example.py file to explain how to use the Python module. Also regenerated documentation.
author Adam Stark <adamstark@users.noreply.github.com>
date Tue, 28 Jan 2014 01:07:44 +0000
parents ce806db4468b
children 2a842ae6422e
rev   line source
adamstark@40 1 BTrack - A Real-Time Beat Tracker
adamstark@40 2 =================================
adamstark@40 3
adamstark@48 4 ** Version 0.9 **
adamstark@48 5
adamstark@48 6 *by Adam Stark, Matthew Davies and Mark Plumbley.*
adamstark@48 7
adamstark@48 8
adamstark@48 9 About BTrack
adamstark@48 10 ------------
adamstark@48 11
adamstark@67 12 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@48 13
adamstark@48 14 Full details of the working of the algorithm can be found in:
adamstark@48 15
adamstark@48 16 * Musicians and Machines: Bridging the Semantic Gap in Live Performance, Chapter 3, A. M. Stark, PhD Thesis, Queen Mary, University of London, 2011.
adamstark@48 17
adamstark@48 18 * 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@48 19
adamstark@48 20
adamstark@49 21 Versions
adamstark@49 22 --------
adamstark@49 23
adamstark@49 24 ==== 0.9 ====
adamstark@49 25
adamstark@49 26 * This is the original version of the BTrack algorithm
adamstark@49 27
adamstark@49 28
adamstark@49 29
adamstark@48 30 License
adamstark@48 31 -------
adamstark@48 32
adamstark@61 33 BTrack is made available under the GNU General Public License, version 3. Please see the included LICENSE.txt for more details.
adamstark@61 34
adamstark@61 35 Usage - C++
adamstark@61 36 -----------
adamstark@61 37
adamstark@61 38 **STEP 1**
adamstark@61 39
adamstark@61 40 Include the BTrack header file as follows:
adamstark@61 41
adamstark@61 42 #include "BTrack.h"
adamstark@61 43
adamstark@61 44 **STEP 2**
adamstark@61 45
adamstark@61 46 Instantiate the algorithm by one of the following:
adamstark@61 47
adamstark@61 48 // to use the default 512 hop size and 1024 frame size
adamstark@61 49 BTrack b;
adamstark@61 50
adamstark@61 51 or:
adamstark@61 52
adamstark@61 53 // to specify a hop size (e.g. 512) and have a frame size of 2 x the hop size
adamstark@61 54 BTrack b(512);
adamstark@61 55
adamstark@61 56 or:
adamstark@61 57
adamstark@61 58 // to specify both the hop size and frame size
adamstark@61 59 BTrack b(512,1024);
adamstark@61 60
adamstark@61 61 **STEP 3.1 - Audio Input**
adamstark@61 62
adamstark@61 63 In the processing loop, fill a double precision array with one frame of audio samples (as determined in step 2):
adamstark@61 64
adamstark@61 65 double *frame;
adamstark@61 66
adamstark@61 67 // !
adamstark@61 68 // do something here to fill the frame with audio samples
adamstark@61 69 // !
adamstark@61 70
adamstark@61 71 and then call:
adamstark@61 72
adamstark@61 73 b.processAudioFrame(frame);
adamstark@61 74
adamstark@61 75 and to check for beats, simply call:
adamstark@61 76
adamstark@61 77 if (b.beatDueInCurrentFrame())
adamstark@61 78 {
adamstark@61 79 // do something on the beat
adamstark@61 80 }
adamstark@61 81
adamstark@61 82 **STEP 3.2 - Onset Detection Function Input**
adamstark@61 83
adamstark@61 84 The algorithm can process onset detection function samples. Given a double precision onset detection function sample called 'newSamples', at each step, call:
adamstark@61 85
adamstark@61 86 b.processOnsetDetectionFunctionSample(newSample);
adamstark@61 87
adamstark@61 88 and then check for beats with:
adamstark@61 89
adamstark@61 90 if (b.beatDueInCurrentFrame())
adamstark@61 91 {
adamstark@61 92 // do something on the beat
adamstark@61 93 }