
Figure 1
Andante con moto of the String Quartet #16 in E♭ Major, K 428, 2nd movement. Encoded in Lilypond by Maurizio Tomasi for the Mutopia Project. This slow movement has a sonata form, as detailed in Section 2.1. Following notations of Hepokoski and Darcy (2006), the primary themes (P/P’) are followed by transitions (TR/TR’), ended with Medial Caesuras (MC/MC’) – they are here Half Cadences (HC) in the main tonality (I). In the exposition, the secondary theme (S) and the conclusion (C) are here in the tonality of the dominant (V, E♭ major). In the recapitulation, both S’ and C’ come back to the main tonality. In the exposition, the S theme ends with a perfect authentic cadence (PAC) named essential expositional closure (EEC), whereas, in the recapitulation, the S’ theme ends with an essential structural closure (ESC). Between the exposition and the recapitulation, the development (Dev) moves to other keys and is concluded by a retransition (RT) focusing on the dominant of the primary key.

Figure 2
Model topologies describing the most common sonata form structure at several resolutions. The set of states Qn has n states. Q3 and Q7 model the basic sections of the sonata form. Q14 (used by the model of Bigo et al. (2017)) and Q18 further model Intro, TR, RT and Coda sections as well as transitional states between these sections, represented with squares: the medial cesuras MC and MC’, but also short transitions between the end of the closing zone and the complete end of the exposition (transition after the closing zone, TC), between the exposition and the development (d), between the development and the recapitulation (r), and between the recapitulation and the Coda (TC’). Initial and final states are circled twice.

Figure 3
Extract of the reference analysis for the second movement of the String Quartet #16 in E♭ major (K428.2), as viewed on http://www.dezrann.net/ (left) and represented as a json file (right). The Primary theme (P) ends with a half cadence in the primary key (I:HC). Here a Transition zone (TR) begins, which stops on different beats according to the references. The A analysis starts the secondary (S) theme after the HC in the primary key on measure 10, whereas the F analysis rather starts it on measure 14 (HC on the dominant key). Onsets in the json file are expressed in quarter notes.

Figure 4
Reference analysis A of 32 sonata-form and sonata-form-like movements in Mozart string quartets. The analyses are projected on the 18 states of Q18. Vertical lines show cadences.

Figure 5
Medial Caesura in Allegro K80.2, measure 15. This half cadence (HC) has a very simple but very efficient tonic/dominant schema. It is reinforced by the sudden change of texture (break) between the unison in eighth notes and the triple hammer blow (hammer) that accentuates the dominant chord on D.
Table 1
Feature tallies for sections of the sonata form on the 32 movements of the corpus of Mozart string quartet movements in sonata form (see Section 4.1). The table shows, for each feature, the number of quarter notes where this feature occurs followed by its number of occurrences on quarter notes labeled as each of the sections in the reference annotation A, as well as, in gray, its expected number should the feature be random or uniformly distributed across the quarter notes. Bold, italic, and the ≫ and ≪ symbols indicate an estimation of the significance of their presence or absence compared to all the other sections as well as to adjacent sections. The total numbers of quarter notes can differ slightly from the sums of the different sections due to rounding of non-integer lengths on some sections (see Figure 3).
| Status | |||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Features | quarters | Intro | P | TR | MC | S | C | TC | d | Dev | RT | … | |||||||||||||||||||
| pat:P | 2448 | 35 | 20 | ≪ | 858* | 193 | ≫ | 341* | 235 | 15 | 13 | ≫ | 23* | 250 | ≫ | 0* | 200 | 0* | 13 | 0* | 12 | 10* | 385 | 8* | 50 | ||||||
| pat:S | 3008 | 0* | 25 | 0* | 237 | ≪ | 482* | 289 | 36* | 16 | 686* | 308 | ≫ | 304* | 246 | 6 | 16 | 0* | 14 | 8* | 473 | 0* | 61 | ||||||||
| ton:I | 4491 | 41 | 38 | 553* | 354 | ≫ | 311* | 432 | 22 | 23 | 229* | 460 | 222* | 367 | 18 | 24 | ≫ | 0* | 22 | ≪ | 360* | 707 | ≪ | 115 | 91 | ||||||
| ton:II | 510 | 0 | 4 | 18* | 40 | ≪ | 74 | 49 | 12* | 2 | 72 | 52 | 79* | 41 | 1 | 2 | 14* | 2 | ≫ | 107 | 80 | 2 | 10 | ||||||||
| ton:III | 479 | 0 | 4 | 27 | 37 | 54 | 46 | 4 | 2 | 70 | 49 | 64* | 39 | 8 | 2 | 5 | 2 | 125* | 75 | 9 | 9 | ||||||||||
| ton:IV | 1734 | 31* | 14 | 186* | 136 | ≫ | 104* | 166 | 1 | 9 | 34* | 177 | 36* | 141 | ≪ | 21 | 9 | 4 | 8 | 168* | 273 | 25 | 35 | ||||||||
| ton:V | 2514 | 0* | 21 | 41* | 198 | ≫ | 467* | 242 | 36* | 13 | 683* | 257 | 468* | 205 | ≫ | 1* | 13 | 4 | 12 | 327* | 396 | 70 | 51 | ||||||||
| ton:VI | 479 | 6 | 4 | ≫ | 12* | 37 | ≫ | 54 | 46 | 2 | 2 | 98* | 49 | 66* | 39 | 0 | 2 | 2 | 2 | ≫ | 90 | 75 | ≫ | 0* | 9 | ||||||
| ton:VII | 386 | 9 | 3 | 20 | 30 | 30 | 37 | 0 | 2 | 14* | 39 | 23 | 31 | 4 | 2 | 0 | 1 | 94* | 60 | 1 | 7 | ||||||||||
| ton:i | 892 | 3 | 7 | 84 | 70 | 52* | 85 | 3 | 4 | 16* | 91 | 23* | 72 | ≪ | 12 | 4 | 22* | 4 | 148 | 140 | ≪ | 42* | 18 | ||||||||
| ton:ii | 534 | 4 | 4 | 33 | 42 | ≫ | 10* | 51 | 0 | 2 | 13* | 54 | 17* | 43 | 1 | 2 | 0 | 2 | 156* | 84 | 8 | 10 | |||||||||
| ton:iii | 356 | 6 | 3 | 5* | 28 | ≪ | 70* | 34 | 4 | 1 | 68* | 36 | 46 | 29 | 0 | 1 | ≪ | 12* | 1 | ≫ | 48 | 56 | 14 | 7 | |||||||
| ton:iv | 349 | 12* | 2 | 6* | 27 | 0* | 33 | 0 | 1 | 16 | 35 | ≪ | 51* | 28 | 0 | 1 | 8 | 1 | 114* | 54 | 18 | 7 | |||||||||
| ton:v | 460 | 0 | 3 | 22 | 36 | ≪ | 69 | 44 | 5 | 2 | 38 | 47 | 8* | 37 | 3 | 2 | 1 | 2 | 162* | 72 | ≫ | 2 | 9 | ||||||||
| ton:vi | 1052 | 0 | 8 | 46* | 83 | 73 | 101 | 2 | 5 | 112 | 107 | 51* | 86 | ≪ | 14 | 5 | ≫ | 0 | 5 | ≪ | 368* | 165 | ≫ | 0* | 21 | ||||||
| ton:vii | 187 | 3 | 1 | 0* | 14 | ≪ | 22 | 18 | 0 | 0 | 21 | 19 | 36* | 15 | 0 | 1 | 4 | 0 | 14 | 29 | 0 | 3 | |||||||||
| cad:PAC | 416 | 4 | 3 | 20 | 32 | 22 | 40 | ≪ | 9 | 2 | 48 | 42 | 72* | 34 | 1 | 2 | 0 | 2 | 29* | 65 | 4 | 8 | |||||||||
| cad:rIAC | 142 | 2 | 1 | ≫ | 16 | 11 | 8 | 13 | 3 | 0 | 15 | 14 | 9 | 11 | 0 | 0 | 0 | 0 | 29 | 22 | 1 | 2 | |||||||||
| harm:# | 144 | 2 | 1 | 13 | 11 | 18 | 13 | 6 | 0 | ≫ | 7 | 14 | 5 | 11 | 1 | 0 | 1 | 0 | 27 | 22 | 1 | 2 | |||||||||
| harm:7 | 1122 | 4 | 9 | 49* | 88 | ≪ | 116 | 108 | 0 | 5 | 68* | 115 | 86 | 91 | ≪ | 18* | 6 | 3 | 5 | 271* | 176 | 17 | 22 | ||||||||
| ped | 971 | 10 | 8 | 116* | 76 | ≫ | 76 | 93 | 0 | 5 | 42* | 99 | 66 | 79 | 1 | 5 | 0 | 4 | 186 | 152 | 20 | 19 | |||||||||
| rest | 331 | 6 | 2 | 35 | 26 | ≫ | 11* | 31 | ≪ | 12* | 1 | ≫ | 15 | 33 | ≪ | 38 | 27 | 4 | 1 | 2 | 1 | 39 | 52 | ≪ | 18 | 6 | |||||
| seq | 1254 | 24 | 10 | 57* | 99 | 61* | 120 | 2 | 6 | 95 | 128 | 60* | 102 | 3 | 6 | ≪ | 29* | 6 | ≫ | 420* | 197 | ≫ | 0* | 25 | |||||||
| unison | 685 | 16 | 5 | 91* | 54 | ≫ | 43 | 65 | 7 | 3 | 43 | 70 | 59 | 56 | ≪ | 24* | 3 | 27* | 3 | ≫ | 68* | 107 | 12 | 13 | |||||||
| break | 482 | 1 | 4 | 24 | 38 | 50 | 46 | ≪ | 12* | 2 | ≫ | 36 | 49 | 47 | 39 | 5 | 2 | 1 | 2 | 74 | 75 | 9 | 9 | ||||||||
| hammer | 268 | 0 | 2 | 14 | 21 | 8* | 25 | ≪ | 14* | 1 | ≫ | 49* | 27 | 20 | 21 | 0 | 1 | 0 | 1 | 52 | 42 | 7 | 5 | ||||||||
| Total | 14318 | 122 | 1130 | 1378 | 76 | 1468 | 1171 | 78 | 71 | 2255 | 292 | … | |||||||||||||||||||
Table 1 (continued)
Feature tallies for sections of the sonata form on the 32 movements of the corpus of Mozart string quartet movements in sonata form.
| States | |||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Features | quarters | … | r | P’ | TR’ | MC’ | S’ | C’ | TC’ | Coda | |||||||||||||||
| pat:P | 2448 | 5 | 5 | ≪ | 770* | 184 | ≫ | 317* | 243 | 15 | 12 | ≫ | 20* | 264 | ≫ | 0* | 218 | 0* | 17 | 32* | 125 | ||||
| pat:S | 3008 | 0 | 6 | 1* | 227 | ≪ | 444* | 299 | 34* | 15 | 692* | 324 | ≫ | 307 | 269 | ≫ | 0* | 20 | 7* | 153 | |||||
| ton:I | 4491 | 20 | 10 | 582* | 339 | ≫ | 524* | 447 | 44* | 23 | 640* | 484 | 497* | 401 | ≪ | 17 | 31 | ≪ | 295* | 229 | |||||
| ton:II | 510 | 0 | 1 | 16* | 38 | 28 | 50 | 5 | 2 | 25* | 54 | ≪ | 56 | 45 | 0 | 3 | 0* | 26 | |||||||
| ton:III | 479 | 1 | 1 | 18 | 36 | 24* | 47 | 0 | 2 | 16* | 51 | ≪ | 46 | 42 | 6 | 3 | ≫ | 1* | 24 | ||||||
| ton:IV | 1734 | 0 | 3 | 156 | 130 | 230* | 172 | 9 | 9 | 269* | 187 | 256* | 155 | 16 | 12 | 188* | 88 | ||||||||
| ton:V | 2514 | 4 | 5 | 36* | 189 | ≪ | 132* | 250 | 13 | 13 | 112* | 271 | 77* | 224 | 10 | 17 | 34* | 128 | |||||||
| ton:VI | 479 | 3 | 1 | 18 | 36 | 35 | 47 | 0 | 2 | 58 | 51 | 27 | 42 | 0 | 3 | 7* | 24 | ||||||||
| ton:VII | 386 | 0 | 0 | 17 | 29 | ≪ | 80* | 38 | 3 | 2 | 35 | 41 | 27 | 34 | ≪ | 12* | 2 | ≫ | 18 | 19 | |||||
| ton:i | 892 | 5 | 2 | 115* | 67 | 148* | 88 | 10 | 4 | 109 | 96 | 46* | 79 | ≪ | 21* | 6 | ≫ | 32 | 45 | ||||||
| ton:ii | 534 | 0 | 1 | 44 | 40 | 64 | 53 | 2 | 2 | 81 | 57 | 36 | 47 | 8 | 3 | 58* | 27 | ||||||||
| ton:iii | 356 | 0 | 0 | 9* | 26 | 18 | 35 | 0 | 1 | 26 | 38 | 28 | 31 | 2 | 2 | 0* | 18 | ||||||||
| ton:iv | 349 | 0 | 0 | 9* | 26 | 9* | 34 | 0 | 1 | 23 | 37 | ≪ | 78* | 31 | 0 | 2 | 4 | 17 | |||||||
| ton:v | 460 | 0 | 1 | 24 | 34 | 43 | 45 | 0 | 2 | 33 | 49 | 27 | 41 | 2 | 3 | 21 | 23 | ||||||||
| ton:vi | 1052 | 0 | 2 | 57 | 79 | 77 | 104 | 2 | 5 | 104 | 113 | 68 | 94 | 2 | 7 | 77 | 53 | ||||||||
| ton:vii | 187 | 0 | 0 | 0* | 14 | ≪ | 34 | 18 | 1 | 0 | 23 | 20 | 17 | 16 | 7 | 1 | 5 | 9 | |||||||
| cad:PAC | 416 | 0 | 0 | 26 | 31 | 25 | 41 | 8 | 2 | 46 | 44 | 73* | 37 | 1 | 2 | 28 | 21 | ||||||||
| cad:rIAC | 142 | 0 | 0 | 18 | 10 | 5 | 14 | 1 | 0 | 17 | 15 | 9 | 12 | 0 | 0 | 9 | 7 | ||||||||
| harm:# | 144 | 0 | 0 | 14 | 10 | 14 | 14 | 4 | 0 | 16 | 15 | 7 | 12 | 2 | 1 | 6 | 7 | ||||||||
| harm:7 | 1122 | 1 | 2 | 53* | 84 | 93 | 111 | 0 | 5 | 100 | 121 | ≪ | 196* | 100 | 12 | 7 | 35 | 57 | |||||||
| ped | 971 | 1 | 2 | 131* | 73 | ≫ | 67 | 96 | 0 | 5 | 47* | 104 | ≪ | 84 | 86 | 2 | 6 | ≪ | 120* | 49 | |||||
| rest | 331 | 5 | 0 | 35 | 24 | ≫ | 14 | 32 | ≪ | 14* | 1 | ≫ | 16 | 35 | 33 | 29 | 3 | 2 | 31 | 16 | |||||
| seq | 1254 | 0 | 2 | 58* | 94 | ≪ | 172* | 125 | 3 | 6 | 118 | 135 | 120 | 112 | 0 | 8 | 32* | 64 | |||||||
| unison | 685 | 8* | 1 | 96* | 51 | ≫ | 44 | 68 | 7 | 3 | 43* | 73 | 49 | 61 | ≪ | 27* | 4 | ≫ | 22 | 35 | |||||
| break | 482 | 3 | 1 | 24 | 36 | 52 | 48 | ≪ | 14* | 2 | ≫ | 37 | 52 | 52 | 43 | 5 | 3 | 36 | 24 | ||||||
| hammer | 268 | 1 | 0 | 14 | 20 | 8* | 26 | ≪ | 12* | 1 | ≫ | 46 | 28 | 16 | 23 | 0 | 1 | 10 | 13 | ||||||
| Total | 14318 | … | 32 | 1081 | 1427 | 74 | 1545 | 1280 | 99 | 732 | |||||||||||||||
Table 2
Classification results, with F1-measures of the five studied HMMs as well as of baseline models on the 14318 quarter notes of the corpus against the reference A. The confusion matrix is detailed for : Each column denotes the quarter notes of a section in the reference analysis, and the rows show how these quarter notes are classified (after cross-validation (c-val.)) by . Underlined values are discussed in the text.
| Q18 | Intro | P | TR | MC | S | C | TC | d | Dev | RT | r | P’ | TR’ | MC’ | S’ | C’ | TC’ | Coda |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Intro | 0 | 154 | 30 | 3 | · | · | · | · | · | · | · | · | · | · | · | · | · | · |
| P | 36 | 751 | 238 | 12 | 4 | · | · | · | · | · | · | · | · | · | · | · | · | · |
| TR | 1 | 86 | 175 | 10 | 121 | 47 | · | 28 | 35 | · | · | 16 | 32 | 4 | 29 | · | · | · |
| MC | 1 | 4 | 19 | 3 | 6 | · | · | · | · | · | · | · | · | · | 1 | · | · | · |
| S | 1 | · | 608 | 27 | 588 | 357 | 2 | · | 11 | · | · | · | · | · | 30 | 9 | · | · |
| C | 1 | 2 | 40 | 6 | 364 | 355 | 10 | · | 202 | · | 5 | 6 | · | · | · | 38 | · | 0 |
| TC | · | 23 | 68 | · | 5 | 1 | 0 | 21 | 114 | · | · | 12 | · | · | · | · | · | · |
| d | 3 | · | 29 | · | 5 | 2 | 6 | 6 | 101 | · | · | 9 | · | · | · | · | · | · |
| Dev | 49 | 85 | 134 | 11 | 268 | 353 | 60 | 16 | 1320 | 87 | 3 | 67 | 56 | 2 | 62 | 110 | 32 | 36 |
| RT | 30 | 24 | 20 | · | 30 | 12 | · | · | 393 | 141 | 14 | 57 | 51 | 3 | 12 | · | · | 5 |
| r | · | · | · | · | · | · | · | · | 20 | 25 | 2 | 49 | 2 | · | · | · | · | · |
| P’ | · | · | 1 | · | 1 | · | · | · | 0 | · | 7 | 713 | 282 | 11 | 35 | 14 | ||
| TR’ | · | · | · | · | · | · | · | · | · | · | · | 46 | 161 | 4 | 174 | 3 | · | 1 |
| MC’ | · | · | 1 | · | 1 | · | · | · | · | · | · | 2 | 18 | 8 | 6 | · | · | 3 |
| S’ | · | · | 14 | 3 | 73 | 14 | · | · | · | · | · | 7 | 549 | 20 | 471 | 393 | · | 16 |
| C’ | · | · | · | · | · | 25 | · | · | 21 | 15 | · | 58 | 197 | 10 | 353 | 213 | 32 | 58 |
| TC’ | · | · | · | · | · | 4 | · | · | 34 | · | · | 9 | 45 | 3 | 42 | 49 | 11 | 12 |
| Coda | · | · | · | · | · | · | · | · | 2 | 24 | · | 28 | 32 | 8 | 328 | 463 | 24 | 587 |
| quarter notes | 122 | 1130 | 1378 | 76 | 1468 | 1171 | 78 | 71 | 2255 | 292 | 32 | 1081 | 1427 | 74 | 1545 | 1280 | 99 | 732 |
| F1 (, c-val.) | 0.00 | 0.69 | 0.18 | 0.05 | 0.38 | 0.32 | 0.00 | 0.05 | 0.53 | 0.26 | 0.03 | 0.66 | 0.18 | 0.15 | 0.30 | 0.19 | 0.07 | 0.53 |
| F1 (equal) | 0.00 | 0.56 | 0.14 | 0.04 | 0.29 | 0.24 | 0.00 | 0.00 | 0.30 | 0.12 | 0.20 | 0.42 | 0.02 | 0.00 | 0.19 | 0.15 | 0.00 | 0.26 |
| F1 (fixed) | 0.02 | 0.15 | 0.18 | 0.01 | 0.19 | 0.15 | 0.01 | 0.01 | 0.27 | 0.04 | 0.00 | 0.14 | 0.18 | 0.01 | 0.19 | 0.16 | 0.01 | 0.10 |
| Q14 | P | TR | MC | S | C | d | Dev | RT | r | P’ | TR’ | MC’ | S’ | C’ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| quarter notes | 1130 | 1378 | 76 | 1468 | 1250 | 71 | 2255 | 292 | 32 | 1081 | 1427 | 74 | 1562 | 2095 |
| F1(, c-val.) | 0.76 | 0.17 | 0.05 | 0.38 | 0.28 | 0.05 | 0.58 | 0.25 | 0.03 | 0.66 | 0.18 | 0.15 | 0.28 | 0.56 |
| F1 () | 0.66 | 0.35 | 0.03 | 0.27 | 0.26 | 0.04 | 0.16 | 0.14 | 0.02 | 0.29 | 0.33 | 0.09 | 0.29 | 0.61 |
| F1 (equal) | 0.40 | 0.05 | 0.00 | 0.20 | 0.04 | 0.00 | 0.16 | 0.08 | 0.11 | 0.23 | 0.00 | 0.00 | 0.12 | 0.31 |
| F1 (fixed) | 0.15 | 0.18 | 0.01 | 0.19 | 0.16 | 0.01 | 0.27 | 0.04 | 0.00 | 0.14 | 0.18 | 0.01 | 0.20 | 0.26 |
| Q7 | P | S | C | Dev | P’ | S’ | C’ |
|---|---|---|---|---|---|---|---|
| quarter notes | 2582 | 1471 | 1321 | 2580 | 2580 | 1565 | 2095 |
| F1 (, c-val.) | 0.65 | 0.37 | 0.25 | 0.68 | 0.54 | 0.33 | 0.54 |
| F1 (equal) | 0.50 | 0.36 | 0.23 | 0.44 | 0.39 | 0.18 | 0.37 |
| F1 (fixed) | 0.31 | 0.19 | 0.17 | 0.31 | 0.31 | 0.20 | 0.26 |
| Q3 | Exp | Dev | Rec |
|---|---|---|---|
| quarter notes | 5374 | 2580 | 6240 |
| F1 (, c-val.) | 0.76 | 0.57 | 0.85 |
| F1 (equal) | 0.41 | 0.30 | 0.68 |
| F1 (fixed) | 0.55 | 0.31 | 0.61 |
Table 3
Number of boundaries predicted exactly or within one measure (+), within between 2 and 3 measures (=), beyond 3 measures (–) or not predicted (!), compared to the reference analysis A. The bottom part of the table shows results obtained with a subset of features.
| main boundaries (total: 124) | all boundaries | |||||||
| + | = | – | ! | + | = | – | ! | |
| 23 | 4 | 54 | 43 | 68 | 21 | 154 | 115 | |
| 34 | 17 | 53 | 20 | 90 | 45 | 147 | 104 | |
| 31 | 16 | 56 | 21 | 87 | 38 | 146 | 87 | |
| 35 | 12 | 61 | 16 | 70 | 15 | 101 | 30 | |
| 16 | 8 | 40 | 0 | 46 | 8 | 42 | 0 | |
| , no pat:P/pat:S | 13 | 7 | 97 | 7 | 32 | 29 | 229 | 96 |
| , no ton:* | 3 | 11 | 100 | 10 | 32 | 31 | 236 | 87 |
| , no cad:* | 35 | 16 | 57 | 16 | 90 | 40 | 159 | 97 |
| , only ton:* | 3 | 8 | 104 | 9 | 24 | 27 | 247 | 88 |
| , no break features | 33 | 12 | 61 | 18 | 85 | 36 | 168 | 97 |

Figure 6
Detection precision (relative to the reference analysis A) of the five HMMs. Boundaries are predicted exactly or within 1 measure (green, + on Table 3), within between 2 and 3 measures (blue, =), more than 3 measures (red, –), or not predicted at all (gray, !). The lines at the left show the numbers of the spurious sections falsely predicted by the models.

Figure 7
Comparison between the reference analysis A (top) and the predicted analysis by (bottom) on six string quartet movements.
