Beat Tracking

Machine Learning
Introduced by
David P. Ellis
Year
2007
Type
Audio signal processing algorithm
Family
Feature extraction

What does it do?

Beat tracking is the task of estimating, from an audio recording, the times at which a listener would tap the musical beat.

It is a core problem in music information retrieval and a prerequisite for analyses that depend on metrical timing. The method page takes Ellis (2007), a dynamic programming tracker, as its originating reference.

The intuition behind the method

A beat tracker looks for moments in the audio where a beat is likely, such as note onsets, and requires the chosen beats to be spaced at a roughly constant interval. These two requirements pull in different directions: the strongest onsets are not always evenly spaced, and an evenly spaced grid can miss onsets. Ellis (2007) treats this as an optimisation problem. A local match term rewards beats at moments of high onset strength, and a transition cost penalises deviation from a tempo estimated earlier from the same audio. Dynamic programming then selects the best-scoring sequence of beat times. Other approaches replace this optimisation with hidden Markov models or neural networks.

History

Ellis (2007) describes a beat tracker that first estimates a global tempo, builds a transition cost from that tempo, and uses dynamic programming to find beat times that match high onset strength. Its abstract reports average beat accuracy just under 60% on the development data of MIREX-06. Later work has moved toward learned models, which are surveyed by Rocher et al. (2023).

When to use it

Choose beat tracking when you need beat times or metrical timing for synchronisation, quantisation, or as input to downstream tasks such as chord recognition or music segmentation. Methods in the Ellis (2007) style assume a reasonably constant tempo and are best suited to music with a steady, clearly audible pulse. Do not rely on them for music with large tempo changes, free-form or unmetred passages, or sparse textures without a clear pulse. Check suitability on the target material before use. Beat times alone do not identify measure starts, so if you need downbeats or bar-level structure, plan for a separate or joint downbeat model.

Limitations and considerations

  • The Ellis (2007) formulation assumes a fixed target tempo. Its abstract reports tracking tempo changes within ±10% of that target, so larger accelerando, ritardando or rubato falls outside the reported range.
  • The transition cost is built from a single global tempo estimate, so the tracker can struggle where the pulse drifts gradually and the global estimate no longer describes the local tempo.
  • Metrical ambiguity: the tracker can lock onto a pulse level that is internally consistent but not the one a listener would tap, such as a faster or slower subdivision of the beat.
  • Accuracy depends on the onset strength function. Sparse or heavily syncopated material gives weak peaks for the local match term to use.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The dynamic programming method of Ellis (2007) needs no annotated training data, because its tempo estimate and transition cost are derived from the audio being analysed.
  • The originator describes the procedure as very simple and computationally efficient, which keeps it inexpensive to run on many recordings.
  • Each output beat is placed at a moment of onset strength selected by the optimisation, so the result can be checked against the onset function.

Applications

  • Synchronising playback or visual effects to the beat, for example in DJ software and live performance systems, where beat times can serve as timing cues.
  • Aligning music with dance or video, where beat times can define cut points or motion cues.
  • Quantising note onsets to a metrical grid in music transcription.
  • Supplying metrical timing as input to chord recognition or music segmentation.

How it works

How it works

1

Compute an onset strength function from the audio, for example from spectral flux or a novelty function applied to a short-time Fourier transform. In the Ellis (2007) approach this function provides the local match score, so beats are favoured at moments of high onset strength.

2

The dynamic programming method of Ellis (2007) has no learned model and no training step. A global tempo is first estimated from the audio, and this tempo sets the transition cost. Learning-based trackers fit their parameters to annotated beat data; they are a separate family of methods and are not part of the Ellis (2007) procedure.

3

Ellis (2007) uses dynamic programming to find the best-scoring set of beat times. The local match term rewards beat times at moments of high onset strength, and the transition cost penalises inter-beat intervals that deviate from the interval implied by the global tempo. Other systems decode beat sequences with Viterbi decoding or with recurrent neural network outputs over the full recording.

4

Compare predicted beat times with annotated ground-truth beats, using a standard beat-evaluation protocol that specifies the tolerance window for a match. Common measures include information gain, the f-measure (the harmonic mean of precision and recall), and tracker continuity, which summarises how long the tracker stays in phase with the annotated beats. The Ellis (2007) abstract reports that the method performs well on the MIREX-06 beat tracking training data, with average beat accuracy just under 60% on the development data. Accuracy figures are comparable only within the same dataset and evaluation protocol.

Common pitfalls

  • Confusing beat with downbeat. The beat is the regular pulse, while the downbeat is the metrically strong position. Beat tracking may return both, but they must not be treated as the same quantity.
  • Trusting the global tempo without checking it. The tempo estimate sets the transition cost for the whole piece, so a wrong initial tempo biases the entire beat sequence. A tempo octave error, where the estimate is at double or half the perceived rate, propagates through the whole output. Compare the estimated tempo with the audio before using the beat times.
  • Ignoring the onset strength stage. Poor choices of window size or peak threshold degrade every later step, so the onset function should be inspected separately where possible.
  • Transferring learned trackers across genres. A model trained on one style, such as pop, may fail on classical or jazz material that lies outside its training data. The untrained Ellis (2007) method avoids this training dependence but still relies on its tempo prior.
  • Skipping output validation. Overlay the beat times on the onset function, or render the beats as clicks over the audio and listen, to confirm that the beats follow the pulse a listener would tap.

Frequently asked questions

What is the difference between beat and tempo?

Beat is the set of times at which a listener feels the pulse; tempo is the average rate of beats per minute. Beat tracking produces beat times, and tempo can then be computed from the intervals between them. The Ellis (2007) method estimates a global tempo as an intermediate step.

Can beat tracking handle music with varying tempo?

The Ellis (2007) method assumes a fixed target tempo. Its abstract reports tracking tempo changes within ±10% of the target. Larger accelerando, ritardando or rubato lies outside that reported range, so more flexible trackers are needed for such material.

How accurate is beat tracking in practice?

Accuracy depends on the dataset, the genre and the metric used. The Ellis (2007) abstract reports average beat accuracy just under 60% on the development data of MIREX-06. Results on other datasets, amateur recordings or non-Western music can differ, so figures should be compared only within the same evaluation protocol.

Is beat tracking the same as downbeat tracking?

No. Beat tracking finds the regular pulse, while downbeat tracking identifies the metrically strongest beat in each measure, usually beat 1 in 4/4 time. Many algorithms model both jointly to obtain the full metrical structure.

Related methods

Sources

  1. Ellis, D. P. (2007). Beat tracking by dynamic programming. Journal of New Music Research, 36(1), 51-60.

    Open DOI reference
  2. Krebs, F., Böck, S., & Widmer, G. (2015). Rhythmic pattern modeling for beat and downbeat tracking in musical audio. Frontiers in Psychology, 6, 1337.

    Open publication reference
  3. Rocher, T., Robine, M., & Marsyas-Meuss, J. (2023). Deep learning approaches for beat tracking: State-of-the-art review. IEEE Access, 11, 15824-15842.

    Open publication reference