# Applying Automatic Translation for Optical Music Recognition's Encoding Step
## 3 Experimental Setup
### Translating Monodic Staves
#### 3.2.1 Translation Categories  
The process of translating from a graphics-oriented representation (agnostic) to a performance-oriented (semantic) representation of music presents some specific challenges for machine learning models. Given the nature of the music data in our corpora (monodic staves), several aspects of the agnostic notation have been identified as potentially difficult to learn for translation to a semantic representation. We call them translation categories, \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Zaragoza** & **FMT-M** & **FMT-C** & **Camera-PrIMuS** \\ \hline Score pages & 24 & 161 & 81 & N/A \\ Staves per page & \(6.0\pm 3.0\) (5) & \(3.5\pm 1.0\) (3) & \(3.9\pm 1.7\) (3) & 1 \\ Notes per staff & \(28.5\pm 7.3\) (28) & \(12.6\pm 5.2\) (14) & \(10.6\pm 4.1\) (10) & \(15.5\pm 5.2\) (15) \\ Other symbols per staff & \(13.8\pm 4.0\) (14) & \(8.7\pm 3.5\) (6) & \(6.2\pm 2.8\) (4) & \(11.3\pm 4.1\) (9) \\ Staves with clef & 96.5\% & 100\% & 25.9\% & 100\% \\ Staves with key signature & 81.8\% & 36.7\% & 52.1 (”)\% & 76.7\% \\ Avg. ratio of notes altered & & & & \\ by key (\({}^{\circ}\)) & 13.0\% & 9.5\% & 24.7 (”)\% & 27.2\% \\ \hline \hline \end{tabular} (\({}^{\circ}\)) when key is present.  
\end{table} 
Table 2: Some statistics about the semantic contents of datasets. Numbers in the form \(a\pm s(m)\) express average, standard deviation, and mode, respectively. (**) These figures include staves with absent keys, for which the keys of the first staves in the same pieces are assumed. Figure 5: An example of an agnostic encoding and its translation into a “_kern_\" semantic encoding. and we are interested in investigating which of these categories are most difficult to learn by the proposed models. For the purpose of our research, four translation categories have been identified, in which at least two agnostic symbols found in the input sequences have to be combined to produce one semantic symbol, or decorated with some additional semantic tokens. These categories are described below. Note that input symbols to be combined do not necessarily have to be adjacent. * **Slurs and ties**. Agnostic encoding of slurs and ties share the same structure: the feature is encoded by a starting symbol, followed by some continuity symbols, and ended by a ending symbol. Slurs and ties decorate the semantic representation of notes enclosed by them. In the agnostic encoding, slurs and ties are represented by the same agnostic symbol token (slur), as they are visually indistinguishable. Depending on the relative positions of these glyphs in the original score, the order in which they appear in the agnostic encoding, as a result of optical recognition, may vary. For example, two tied notes can be encoded as  note.eighth_up:L2, slur.start:L2, slur.end:L2, note.quarter_up:L2 or as  slur.start:L2, note.eighth_up:L2, note.quarter_up:L2, slur.end:L2 Figure 6 presents a example of this translation category. * **Dotted notes**. Dots affect the duration of the note preceding them. They are encoded as separate symbols in the agnostic encoding, but have to be translated into single output symbols, as in the following example:  note.quarter_up:S2, dot:S2 --> 4.a/
* **Pitch**. The pitch of a note in a semantic encoding depends both on the current clef and its vertical position in the staff, which usually appears at the beginning of the staff, and the vertical position of the note glyph, encoded as part of the symbol representing that note. As an example,  clef.G:L2,..., note.eighth_down:L3 --> 8b\  
models must learn to combine both the G clef in the second line and the eight note in the third line, which may be separated by an undefined number of other symbols, to produce a single semantic symbol (an eighth B note, represented as \"8b\" in this case), which contains the correct token of pitch information, which is \"b\" in this example, provided by the distant clef. Figure 6: Examples of the translation of slurs and ties.