- Introduced by
- Masataka Goto
- Year
- 2001
- Type
- Audio structural analysis
- Family
- Structure analysis
What does it do?
Music segmentation, also called structural segmentation or music structure analysis, is the task of dividing an audio recording into sections such as verse, chorus, bridge, pre-chorus and outro.
Section boundaries and labels depend on musical form, so they vary with genre and with the conventions the analyst applies. Segmentation is used in music understanding, audio editing and composition analysis.
The intuition behind the method
Many songs repeat material: a verse may be unique in its lyrics, while a chorus returns as a repeated hook, and a bridge often contrasts with both. These sections differ in acoustic character (harmony, timbre, instrumentation and energy). Segmentation methods often compare feature frames across time, for example with a self-similarity matrix that compares each frame with every other frame. Repeated sections then appear as similar blocks, and changes in features suggest where one section ends and another begins.
History
Structural segmentation of musical audio is a research topic in music information retrieval. Levy and Sandler (2008) proposed a method that labels audio frames as discrete states using a hidden Markov model trained on spectral features, then clusters histograms of neighbouring frames into segment types under temporal-continuity constraints modelled as a hidden Markov random field. Their constrained-clustering framework can also incorporate prior musical knowledge, input from other machine approaches, or semi-supervision.
When to use it
Choose music segmentation when the question concerns the formal layout of a recording and the audio contains recognisable repetition or contrast, as in much popular music. It suits audio editing and musicological analysis of form. Avoid it for ambient, experimental or improvisational music, where repeated material is often absent and boundaries are not well defined. It is also a poor choice when sample-accurate boundary timing is needed, because the boundaries it returns are approximate.
Limitations and considerations
- The approach depends on repetition and contrast; free-form or improvisational music gives it little to work with.
- Boundary timing is often imprecise, so the detected boundaries may not coincide with the perceived section change.
- Feature changes that are not structural, such as a timbre shift within a section, can produce spurious boundaries.
- Assigning musically meaningful labels such as verse or chorus requires interpretation beyond the acoustic features, so the labels produced by an automatic method may not match conventional section names.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Repeated sections, such as a chorus returning, appear as similar blocks in the self-similarity matrix, so repetition can be used to group sections.
- Combining harmony, timbre and energy features lets changes in each dimension contribute to boundary detection.
- The constrained-clustering approach of Levy and Sandler (2008) can incorporate prior musical knowledge or semi-supervision, which allows extension beyond purely unsupervised use.
- In the experiments reported by Levy and Sandler (2008), the resulting segmentations in many cases corresponded well to conventional notions of musical form.
Applications
- Automatic music editing and remixing based on structural boundaries.
- Musicological analysis of musical form.
- Music education, such as teaching song form and compositional structure.
How it works
How it works
Extract frame-level features from the audio, such as chroma for harmony, MFCCs for timbre and spectral flux for energy change. Compare the feature vectors of all pairs of frames to form a self-similarity matrix.
Levy and Sandler (2008) train a hidden Markov model on the frame features to assign each frame to one of a number of discrete states. Their constrained-clustering stage can also take prior musical knowledge or semi-supervision. Other segmentation methods differ: some set boundary-detection parameters from manually annotated boundaries, while unsupervised methods need no annotated training data. The training route should match the method in use and the annotated data available.
Frames are first labelled as belonging to one of several discrete states by the hidden Markov model. Histograms of neighbouring frames are then clustered into segment types, each representing a distinct distribution of states, with temporal continuity expressed as constraints modelled by a hidden Markov random field. Structural sections are obtained from this hierarchical labelling (Levy and Sandler, 2008). More generally, other methods detect candidate boundaries from feature changes or from the self-similarity structure and then group the resulting segments by similarity.
Compare predicted boundaries with ground-truth boundaries using precision, recall and F-measure. A predicted boundary counts as correct if it lies within a stated tolerance window of a ground-truth boundary. Precision is the number of correct predicted boundaries divided by the number of predicted boundaries. Recall is the number of correct predicted boundaries divided by the number of ground-truth boundaries. F-measure is their harmonic mean, 2PR/(P+R). Compare predicted section labels with annotated labels separately. Because boundary scores depend on the matching tolerance, the tolerance should be reported with the results.
Common pitfalls
- Confusing structural segmentation with temporal segmentation. Structural segmentation identifies formal sections; temporal segmentation splits time into equal frames and does not reflect musical form.
- Assuming universal section labels. Terms such as verse, chorus and bridge are tied to particular genres and traditions, and may not describe non-Western or many folk repertoires.
- Ignoring repetition at more than one timescale. A melody or rhythm may repeat within a section as well as across sections, and analysis at a single scale can miss one of these levels.
- Reporting boundary F-measure without stating the matching tolerance. Scores from different studies are not comparable unless the tolerance is the same.
Frequently asked questions
How is music segmentation different from beat or downbeat tracking?
Beat tracking locates a regular pulse at many points within a piece. Segmentation locates a small number of structural boundaries across a whole recording, so the two tasks operate on very different timescales.
Can segmentation detect subtle variations within a section?
Standard approaches are built to find major section boundaries. Finer variations, such as a pre-chorus or an outro introduction, may be missed and may need more sensitive models or analysis at several timescales.
How does segmentation work on improvisational music?
Poorly in most cases. The approach relies on repeated material and on contrast between sections; improvisation often has neither in a recognisable form, so the boundaries it returns are unreliable.
What information is most useful for segmentation: harmony, timbre, or rhythm?
Each can help. Harmony (chord changes) can signal modulation and harmonic sections. Timbre (instrumentation changes) can signal arrangement shifts. Rhythm and tempo changes can also mark section boundaries. Because each feature captures a different kind of change, combining several is a common design choice.
Related methods
Sources
Goto, M., & Hasegawa, Y. (2001). Automatic transcription of popular music audio. In Proceedings of the Fourth International Conference on Music Information Retrieval.
Open publication referenceLevy, M., & Sandler, M. (2008). Structural segmentation of musical audio by constrained clustering. IEEE Transactions on Audio, Speech, and Language Processing, 16(2), 318-326.
Open DOI referenceMcVicar, M., Santos-Rodríguez, R., Ni, Y., & De Bie, T. (2014). Automatic annotation of musical key and time signature from audio using Hidden Markov Models. In Proceedings of the International Society for Music Information Retrieval Conference.
Open publication reference