Automatically Annotating Sheet Music

So we have music where each note's pitch is represented in the matrix below - extended in any direction if necessary:

C♯ G♯ D♯A♯ E♯ B♯ F♯♯C♯♯G♯♯
A EBF♯ C♯ G♯ D♯A♯E♯
F CGDAEBF♯C♯
D♭ A♭E♭ B♭FC GDA
B♭♭ F♭C♭ G♭D♭A♭ E♭B♭F

Chord Annotations

In ordinary sheet music, if there is an A note, we still have to know which A in the matrix that would be. In this limited portion of the matrix there are three candidates. They differ by a syntonic comma. In the music you can hear on this website, each harmonic chord is limited to four consecutive columns in the matrix. That is a consequence of how pitches are assigned to notes. If you inspect a random set of four consecutive columns in the matrix, you may notice that there are no note name repetitions within that set. So if we just write, in the score, over each harmonic chord exactly which set of four consecutive columns is involved, we pin down all required pitches unambiguously. There exist alternative notations which require single notes to be annotated, for instance the notation used in [Du 2006]. But the chord annotations described below have the practical advantage that it is technically easy to automatically add them to existing score. Also, the chord annotation requires many fewer extra symbols in the score than does a note annotation system.

The actual chord annotation symbols used are combinations of two note names as they occur in the middle row of the matrix above. For instance af♯, referring to the grey background cells above, marks the first and the last of the four consecutive columns involved in the score at that point. Many chords occupy fewer than four consecutive columns in the matrix. Such chords would allow two or more different annotation symbols to pin down the same set of pitches.

When we have added such annotations to a piece, it may look as follows:

Score of modulation from C to D♯ by Reger with chord annotations

This is the modulation from C major to D♯ major by Max Reger we encountered earlier. The annotations are just the symbols "ca" over the first chord and "ec♯" over the second measure. The matrix below shows the pitches actually used in this fragment, except the one in parentheses: that is only used in the annotation marks.

F♯♯C♯♯
EBG♯D♯A♯E♯
CGDAEB(C♯)
F

We can check that the first annotation in the score (ca) instructs the organist to use, from that point onwards, the pitches in the leftmost four columns of this matrix (the grey row contains C and A, delimiting those columns). And right when the first G♯ note appears in the score, the second annotation (ec♯) takes over and the remainder of the fragment consists of pitches in the rightmost four columns (the grey row contains E and the unused C♯ delimiting those columns).

The process of adding such annotations consists of the following automated steps.

  1. Read the MusicXML file from disk and meanwhile convert it to a list of chords.
  2. Determine the best pitch assignment to all the notes as described here.
  3. Read the MusicXML file from disk again and meanwhile write to disk a modified MusicXML file in which the annotations have been added. The lyrics capability of MusicXML is used for this.

Specialized commercial music software can then be used to read in the MusicXML file and render the score that can be printed.

Reading in the MusicXML file again in step 3 (instead of reusing what was read in in step 1) has the technical advantage that the file, which can be huge for even a modest piece of music, never has to be in the computer's memory entirely. The computer just reads, uses, writes and drops tiny fractions until it is finished. Oh well, maybe this concern of sparing computer memory is a bit old fashioned.

Column Shift Annotations

The chord annotations above are strictly sufficient for the organist to determine the exact pitches to be played. So s/he could figure out which selection of five consecutive matrix columns is needed and which keys/buttons have to be pressed on the keyboard. To make that a bit easier, an extra set of annotations is added as demonstrated below. These are like the annotations in sheet music for a concert harp that instruct the harpist which pedals to push or release. The extra annotations specified below instruct the organist when to shift the selection of five consecutive matrix columns.

Score of modulation from C to D♯ by Reger with both annotations

The column shift annotations are the upper case letters over a black triangle. The upper case letter specifies the middle column (check the grey row in the matrix above) of the selection of five columns that should be available on the keyboard from that moment on. Apart from the first one, each column shift annotation has a vertical bar to the left or to the right. That indicates whether to shift to the left or to the right.

A column shift annotation (upper case) encompasses five matrix columns. The organist can only shift them one column at a time. A chord annotation (lower case) encompasses four consecutive matrix columns. They can make larger leaps as is actually the case in the example. A complete annotated score is given for BWV701.

Next: Sound files

Previous: Just intonation keyboards

Home