Written and maintained by CASRAI Editorial Board
Published
On this page
Music information retrieval (MIR) is the research field that develops computational tools for processing, searching, organizing and accessing music-related data, according to the International Society for Music Information Retrieval (ISMIR). In practice that means turning audio recordings and symbolic scores into measurable descriptors such as beats, chords, melodies and sections, then testing how well an algorithm reproduces human annotations.
What is music information retrieval?
MIR sits between signal processing, machine learning, information retrieval and music scholarship. A MIR system takes music in some form (a waveform, a score, a metadata record) and returns something a person or another program can search, compare or count. Typical outputs are a list of beat times, a chord label for each stretch of audio, a melody contour, a segment boundary list or a similarity ranking across a collection.
For researchers outside engineering, MIR matters because it makes music data analysable at a scale a single listener cannot reach, and because it brings a habit of reproducible evaluation: algorithms are compared against annotated reference data with agreed metrics. That habit is the part this page concentrates on. Digital musicologists who already work with scores or recordings can read it alongside the CASRAI overview What is musicology? and the practical guides to librosa, a Python library for audio analysis, and MusicXML, an exchange format for notated music.
MIR as a community and a literature
ISMIR describes itself as a non-profit organisation that runs an annual conference; its mailing list has existed since 2000. The society also publishes the Transactions of the International Society for Music Information Retrieval (TISMIR), an open-access journal created to complement the conference proceedings. The ISMIR site lists the 2026 conference as 8 to 12 November 2026 in Abu Dhabi and the 2027 conference as 6 to 10 September 2027 in London. Methods papers and evaluation studies in this field are therefore usually found in the ISMIR proceedings and in TISMIR.
Core MIR tasks
The clearest map of the field’s tasks is the list of evaluation modules in mir_eval, an open-source Python library that describes itself as a transparent, standardized and straightforward way to evaluate MIR systems. Its task modules are beat, onset, chord, melody, alignment, multipitch, pattern, segment, hierarchy, tempo, transcription, transcription_velocity and key. Each corresponds to a research task with its own annotation conventions.
- Beat tracking estimates the times of the perceived pulse in a recording.
- Onset detection estimates when notes or other musical events begin.
- Chord estimation assigns chord labels to time spans of audio.
- Melody extraction estimates the pitch of the main melody over time.
- Multipitch estimation and transcription estimate several simultaneous pitches or full note events.
- Segmentation and hierarchy locate section boundaries and their nested structure.
- Tempo and key estimation return a single global descriptor for a passage.
- Alignment and pattern discovery match performances to scores and find repeated musical material.
Outside evaluation, common MIR work also includes genre or mood classification, similarity search and recommendation. Those tasks are usually scored with ordinary classification or ranking measures rather than the time-based metrics above.
How MIR systems are evaluated
Every task module in mir_eval exposes an evaluate() function that returns a dictionary of metrics, so a single call scores an estimate against a reference annotation. The metrics differ by task because the data differ: beat times are compared within a time window, chords are compared by label under a chosen vocabulary, and so on. For chords, the library offers comparison functions at several levels of detail, including root, thirds, thirds_inv, majmin, majmin_inv and sevenths, which means a reported chord score is meaningless unless the comparison level is stated.
Beat tracking shows the pattern most clearly, because mir_eval’s beat module offers six families of score with different assumptions. The data table below lists each score with its main default parameter, as documented for the library. It is the crosswalk to use when choosing which beat metric to report and which setting to state.
Which beat metric measures what
- F-measure counts an estimated beat as correct if it falls within a small window around a reference beat. The default window is 0.07 seconds.
- Cemgil’s score replaces the hard window with a Gaussian error for each estimated beat (default sigma 0.04 seconds) and also compares against metrical variations of the reference.
- Goto’s score is binary: it is 1 when at least 25% of the estimated beat sequence closely matches the reference sequence, otherwise 0.
- McKinney’s P-score cross-correlates the estimated and reference beats as impulse trains, with a window of 0.2 times the median inter-annotation interval.
- Continuity scores (CMLc, CMLt, AMLc, AMLt) measure the proportion of the sequence that is continuously correct, with and without allowing other metrical levels; the default continuity threshold is 0.175.
- Information gain is the Kullback-Leibler divergence of the normalised beat error histogram from a uniform distribution, using 41 bins by default.
Worked example: the beat-tracking F-measure
This example is an illustrative composite: the beat times are invented for teaching and do not come from any recording or dataset. Suppose an annotator marked eight reference beats, in seconds, at 0.50, 1.00, 1.50, 2.00, 2.50, 3.00, 3.50 and 4.00. A beat tracker returns seven estimates: 0.52, 1.03, 1.49, 2.12, 2.51, 3.02 and 3.98. We use the library’s default 0.07 second window.
Formula with every symbol
Precision is P = TP / E, recall is R = TP / N, and the F-measure is F = 2PR / (P + R). Here TP is the number of true positives (estimated beats within the window of a reference beat, with each reference beat used at most once in this example), E is the number of estimated beats and N is the number of reference beats. This is the standard precision-recall definition, explained further in the CASRAI guide to the precision and recall formula; the mir_eval page documents the F-measure as correct versus incorrectly predicted beats over a small window.
Step-by-step arithmetic
| Estimate (s) | Nearest reference (s) | Difference (s) | Within 0.07 s? |
|---|---|---|---|
| 0.52 | 0.50 | 0.02 | Yes |
| 1.03 | 1.00 | 0.03 | Yes |
| 1.49 | 1.50 | 0.01 | Yes |
| 2.12 | 2.00 | 0.12 | No |
| 2.51 | 2.50 | 0.01 | Yes |
| 3.02 | 3.00 | 0.02 | Yes |
| 3.98 | 4.00 | 0.02 | Yes |
Six estimates match, so TP = 6, E = 7 and N = 8. Then P = 6/7 = 0.857 and R = 6/8 = 0.750. The F-measure is F = 2 × 0.857 × 0.750 / (0.857 + 0.750) = 1.286 / 1.607 = 0.800. An equivalent shortcut is F = 2TP / (E + N) = 12 / 15 = 0.800. The reference beat at 3.50 was never estimated, and the estimate at 2.12 missed its reference at 2.00 by 0.12 seconds.
The window changes the answer
Widening the window to 0.15 seconds makes the estimate at 2.12 count, so TP = 7, P = 7/7 = 1.000, R = 7/8 = 0.875 and F = 14/15 = 0.933. Same system, same data, a score that moves from 0.80 to 0.93. This is why the window size must always accompany the number.
Interpreting the result
A score is only meaningful relative to the metric, its parameters and the reference annotations. The table gives reading guidance that follows from how the metrics are defined rather than from any universal cut-off; there is no standard threshold at which a MIR score counts as good.
| Situation | How to read the score |
|---|---|
| High F-measure, low continuity score | Many individual beats fall inside the window, but the correct stretches are broken up by errors, so a continuity measure penalises the sequence. |
| High Goto score | Goto’s score is binary, so 1 only says at least 25% of the sequence matched closely; it does not rank two systems that both pass. |
| F-measure rises when only the window widens | The system did not improve; the criterion became more lenient, as the 0.80 to 0.93 example shows. |
| Different metrical level | An estimate at double or half the reference rate can fail F-measure yet score under the “any metrical level” continuity variants, which exist for that reason. |
Assumptions and common mistakes
- Treating the reference as truth. Reference beats, chords and boundaries are human judgements. Listeners legitimately disagree, so annotation agreement is worth measuring; see the CASRAI guide on choosing an inter-rater reliability coefficient.
- Omitting the preprocessing. The mir_eval beat module provides trim_beats, which removes beats before a minimum time (default 5.0 seconds) and which its documentation calls a common preprocessing step. A score computed with and without trimming is not comparable.
- Comparing across comparison levels. A chord score at the root level and one at the sevenths level answer different questions.
- Quoting one metric for a multi-metric task. Beat tracking has six score families because no single number captures timing accuracy, continuity and metrical level at once.
- Using different implementations. The point of a shared library is that evaluation code is the same across studies; re-implementing a metric invites silent differences.
- Ignoring the data. A score from one genre, tempo range or recording condition does not transfer to another collection.
How to report MIR evaluation results
State the task, the dataset and its annotation source, the library and version, the metric names and every non-default parameter. For the beat example above, a results sentence could read: “Beat tracking was evaluated with the F-measure from mir_eval using a 0.07 s tolerance window (Raffel et al., 2014); the illustrative system scored F = 0.80.” Cite the library itself in the reference list. In APA 7th edition format:
Raffel, C., McFee, B., Humphrey, E. J., Salamon, J., Nieto, O., Liang, D., & Ellis, D. P. W. (2014). mir_eval: A transparent implementation of common MIR metrics. In Proceedings of the 15th International Society for Music Information Retrieval Conference.
Because the field’s findings live in conference proceedings, citing ISMIR proceedings and TISMIR articles for task definitions and prior results is normal practice.
How to calculate MIR metrics in Excel, R or Python
Excel
Put TP in cell B1, the number of estimated beats in B2 and the number of reference beats in B3, then compute the F-measure in B4:
=2*B1/(B2+B3)
With the example values 6, 7 and 8 this returns 0.8. Counting TP still requires matching beats within the window, which is why a dedicated library is safer for real data.
R
tp = 6; e = 7; n = 8; p = tp/e; r = tp/n; f = 2*p*r/(p+r); round(f, 3) returns 0.8.
Python with mir_eval
import numpy as np, mir_eval
ref = np.array([0.5, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0])
est = np.array([0.52, 1.03, 1.49, 2.12, 2.51, 3.02, 3.98])
mir_eval.beat.f_measure(ref, est) returns 0.8, and mir_eval.beat.f_measure(ref, est, f_measure_threshold=0.15) returns 0.933. This example calls f_measure directly because every beat in it falls before the 5.0 second default of trim_beats; for real recordings, trim both arrays first, as the library’s own example does. Calling mir_eval.beat.evaluate(ref, est) returns the full set of beat metrics in one dictionary. Real beat times are usually loaded with mir_eval.io.load_events.
Sources
- International Society for Music Information Retrieval: ISMIR home page, checked 2026-11-18
- mir_eval documentation: home, checked 2026-11-18
- mir_eval documentation: mir_eval.beat, checked 2026-11-18
- mir_eval documentation: mir_eval.chord, checked 2026-11-18
Data: mir_eval beat-tracking metrics and their default parameters
Compares the six score families in the mir_eval beat module by what each measures and its main documented default parameter, compiled from the library's API documentation for beat evaluation.
| Metric | What it measures | Main default parameter | Default value |
|---|---|---|---|
| F-measure | Correct versus incorrectly predicted beats within a small window | f_measure_threshold | 0.07 s window |
| Cemgil | Gaussian error of each estimated beat against reference beats and metrical variations | cemgil_sigma | 0.04 |
| Goto | Binary: 1 when at least 25% of the estimated sequence closely matches the reference | threshold / mu / sigma | 0.35 / 0.2 / 0.2 |
| P-score (McKinney) | Cross-correlation of estimated and reference beats as impulse trains | window | 0.2 x median inter-annotation interval |
| Continuity (CMLc, CMLt, AMLc, AMLt) | Proportion of the beat sequence that is continuously correct, at the correct or any metrical level | continuity threshold | 0.175 |
| Information gain | K-L divergence of the normalized beat error histogram from a uniform distribution | number of histogram bins | 41 |
Sources
- mir_eval documentation: mir_eval.beat (accessed 2026-11-18)
Compiled by CASRAI from the sources above. Free to reuse under CC BY 4.0 with attribution.







