SuperCollider CLASSES (extension)


autocorrelation beat tracker
Inherits from: Object


NOTE: synonym for BeatTrack these days, since BeatTrack went in core

Autocorrelation beat tracker by Nick Collins, following:

M. E. P. Davies and M. D. Plumbley. Beat Tracking With A Two State Model. Proceedings of the IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP 2005), Philadelphia, USA, March 19-23, 2005

This is my own adaptation for my beat tracking research and uses my own C implementation of Matthew Davies' original MATLAB model. Meanwhile, Paul Brossier and Matthew have been preparing their own realtime version for Paul's aubio library.

There are four k-rate outputs, being ticks at quarter, eighth and sixteenth level from the determined beat, and the current detected tempo.

Note the following restrictions:

This beat tracker determines the beat, biased to the midtempo range by weighting functions. It does not determine the measure level, only a tactus. It is also slow reacting, using a 6 second temporal window for it's autocorrelation maneouvres. Don't expect human musician level predictive tracking.

On the other hand, it is tireless, relatively general (though obviously best at transient 4/4 heavy material without much expressive tempo variation), and can form the basis of computer processing that is decidedly faster than human.

Class Methods

*kr (in, lock: 0)



Audio input to track


If this argument is greater than 0.5, the tracker will lock at its current periodicity and continue from the current phase. Whilst it updates the model's phase and period, this is not reflected in the output until lock goes back below 0.5.

Inherited class methods

Instance Methods

Inherited instance methods


//choose some file you want to track off your hard drive (mono),"/data/audio/mirdata/stevebeattrack/samples/100.wav");

a= SynthDef(\help_autotrack,{arg vol=1.0, beepvol=1.0, lock=0;
var trackb,trackh,trackq,tempo;
var source, beep;


#trackb,trackh,trackq,, lock);





a.set(\lock,1); //fix it rigidly from current phase/period solution

a.set(\lock,0); //unfix, back to tracking

//track audio in (try clapping a beat or beatboxing, but allow up to 6 seconds for tracking to begin) and spawning stuff at quarters, eighths and sixteenths
var trackb,trackh,trackq,tempo;
var source;
var bsound,hsound,qsound;





qsound=*(,0.05)),5000),0.5);, bsound+hsound+qsound);