## 4 Educational Guide
### Chord Recognition (Part 5)  
Another essential and long-studied MIR task is the analysis of harmonic properties of a piece of music by determining an explicit progression of chords from a given music representation--a task often referred to as automatic chord recognition. Following ([1], Chapter 5), we consider a simplified scenario, where only the minor and major triads as occurring in Western music are considered. Assuming that the piece of music is given in the form of an audio recording, the chord recognition task consists in splitting up the recording into segments and assigning a chord label to each segment. The segmentation specifies the start and end time of a chord, and the chord label specifies which chord is played during this time period (see Figure 13). In Part 5 of the FMP notebooks, we provide and discuss Python code examples of all the components that are required to realize a template-based and an HMM-based chord recognizer. Based on evaluation metrics and suitable time-chord representations, we quantitatively and qualitatively discuss how the various components and their parameters affect the chord recognition results. To this end, we consider real-world music recordings, which expose the weaknesses of the automatic procedures, the problem modeling, and the evaluation metrics. The first notebooks of **Part 5** mainly provide sound examples of basic musical notions such as intervals, chords, and scales with a focus on Western tonal music. In the FMP Notebook _Intervals_, we provide Python code examples for generating sinusoidal sonifications of intervals. We then generate sound examples of the various music intervals with respect to equal temperament, just intonation, and Pythagorean tuning. Besides a mathematical specification of deviations (given in cents), the sound examples allow for an acoustic comparison of intervals generated based on the different intonation schemes. Similarly, in the FMP Notebook _Chords_, we give sound examples for different chords. In particular, we provide a piano recording as well as a synthesized version of each of the twelve major and minor triads. Finally, in the FMP Notebook _Musical Scales and Circle of Fifths_, we cover the notions of musical scales and keys. In particular, we look at diatonic scales, which are obtained from a chain of six successive perfect fifth intervals and can be arranged along the circle of fifths. In summary, these three notebooks show how simple sonifications may help to better understand musical concepts. In a music processing course, one may develop small tools for ear training in basic harmony analysis as part of student projects. Figure 13: Chord recognition task illustrated by the first measures of the Beatles song “Let It Be.” (**a**) Score of the first four measures. (**b**) Chromagram (visually superimposed with a reference annotation) derived from an audio recording. (**c**) Chord recognition result shown as binary time-chord representation (visually superimposed with a reference annotation). (**d**) Reference annotation. After the musical warm-up in the previous notebooks, we introduce in the FMP Notebook Template-Based Chord Recognition a simple yet instructive chord recognizer. For illustration, we use the first measures of the Beatles song \"Let It Be\" (see Figure 13), which is converted into a chroma representation. As we already discussed in the context of music synchronization, there are many different ways of computing chroma features. As examples, we compute and visualize three different chroma variants as provided by the Python package librosa. Furthermore, we provide Python code examples to generate chord templates, compare the templates against the recording's chroma vectors in a frame-wise fashion, and visualize the resulting similarity values in the form of a time-chord representation. By looking at the template that maximizes the similarity value, one obtains the frame-wise chord estimate, which we visualize in the form of a binary time-chord representation (see Figure 13c).