Home

Awesome

Digital edition of Mozart piano sonatas

This repository contain a digital edition of 17 piano sonatas composed by Wolfgang Amadeus Mozart (with one sonata re-attributed to August Eberhard Müller), encoded in the Humdrum file format. The reference edition is the Alte Mozart-Ausgabe, series 20, published in 1878 by Breitkopf & Härtel, Leipzig, Germany.

Online viewing

Graphical notation for the data files can be viewed online at Verovio Humdrum Viewer. Here are links to the individual movements:

NumberNMAkeyK<sup>1</sup>K<sup>6</sup>mvmt. 1mvmt. 2mvmt. 3
11C major279189dAllegroAndanteAllegro
22F major280189eAllegro assaiAdagioPresto
33B-flat major281189fAllegroAndante amorosoRondo: Allegro
44E-flat major282189gAllegroMenuett I & IIAllegro
55G major283189hAllegroAndantePresto
66D major284205bAllegroRondeau en polonaise: AndanteThema
77C major309284bAllegro con spiritoAndante un poco adagioRondo: Allegretto grazioso
88A minor310300dAllegro maestosoAndante cantabile con expressionePresto
99D major311284cAllegro con spiritoAndante con expressioneRondo: Allegro
1010C major330300hAllegro moderatoAndante cantabileAllegretto
1111A major331300iThema: Andante graziosoMenuetto & TrioAlla Turca: Allegretto
1212F major332300kAllegroAdagioAllegro assai
1313B-flat major333315cAllegroAndante cantabileAllegretto grazioso
1414C minor457AllegroAdagioMolto allegro
1516C major545AllegroAndanteRondo: Allegretto
1617B-flat majorAnh. 136Anh.C 25.04/05AllegroAdagioAllegretto
1718D major576AllegroAdagioAllegretto

Corrections

If you think that there is a mistake in the data, verify that there is a problem by typing alt-p in VHV to compare to a scan of the source edition. The following figure demonstrates viewing of the PDF of the reference edition underneath the VHV webpage (click to view the image at full resolution):

<img src="https://user-images.githubusercontent.com/3487289/41814574-8ed78340-7706-11e8-94b8-279101207ac4.png" width="800" />

If an error is found, there are two methods for fixing it. A simple method is to report the problem on the issues page for this repository. You should cite the work and movement numbers with a description of the error. Preferably you should alto mention the page number and system in the PDF where the error occurs, since the source edition does not have measure numbers. Cite the measure number in the source edition (visible at the start of the systems in VHV, as well as after = signs in the data). Also preferably you should include a snapshot of the error in the VHV notation and PDF scan of the corresponding spot.

For example, here is a slur missing on beat three of measure three from a sonata:

<table> <tr> <td style="vertical-align:top"> <i>Snapshot from VHV:</i> <br/> <img src="https://user-images.githubusercontent.com/3487289/41737006-e9c1f9d6-7542-11e8-8a06-520c617091bd.png" width="250" /> </td> <td style="vertical-align:top"> <i>Snapshot from PDF:</i> <br/> <img src="https://user-images.githubusercontent.com/3487289/41737010-ed39c1f2-7542-11e8-998d-f8bf86870529.png" width="250" /> </td> </tr> </table>

How you generate the snapshots will depend on your operating system. On MacOS computers, type command-shift-4 and then draw a box around the region to capture.

Images can be added to the issue report by dragging-and-dropping them into the report form.

More advanced users can submit a pull request fixing the error, after first making a fork (i.e., a copy) into their Github account.

In both case, you will have to create a free account on Github.

Some mistakes are intentional and are related to limitations in verovio which is used to render the graphical notation, or in the converter from Humdrum-to-MEI. You can report these sorts of errors, but they will be fixed over time on their own by magical programming gnomes. Errors worth reporting include wrong pitches, invisible accidentals (correct pitch, but cautionary accidental matching the source edition is not visible). Slurs starting/stopping on wrong notes (cross staff slurs are only partially implemented in verovio). The wrong stem directions on notes or beams, or slurs are on the wrong sides of the staves. Missing dynamics (dynamics placement is currently limited to the middle of the grand staff and cannot yet be shown below the staff).

The vertical positions of rests are intended to match the source edition as well. These are currently being implemented in the converter, with some rests requiring manual placement in the data. Rests requiring automatic positioning have a few bugs which should improve over time.

Slur angles are determined solely by verovio and are not interesting to submit as bug reports (only slur orientation and note attachments are of interest for error correction). Stem lengths and beam angles are also not encoded in the data and are left to verovio to determine (and verovio still needs work on this point).

Line/page breaks and staff spacings are dependent on verovio and not taken from the source edition.

Downloading

The files can be downloaded by clicking on the green "Clone or download" button that should be near the top right corner of this page. Then choose "Download ZIP" in the drop-down menu that appears.

To download with git:

git clone https://github.com/craigsapp/mozart-piano-sonatas

To update your copy with any new changes to the data, type this command within the mozart-piano-sonatas directory:

git pull

Alternate access to data

This digital edition is also accessible in a variety of interfaces described below.

KernScores website access

These digital scores are available on the kernScores library of Humdrum musical scores:

with mirrors at:

this includes dynamic conversions to other data formats.

Command-line downloading with Humdrum Extras

The Humdrum Extras command-line programs can download these files from kernScores. A quick method of downloading:

    mkdir -p mozart/piano-sonatas
    cd mozart/piano-sonatas
    humsplit h://mozart/sonatas

To get online access to a single movement, for example to transpose the first movement of the first sonata from C major to B major:

   transpose -k b h://mozart/sonatas/sonata01-1.krn

To interface to the original Humdrum Toolkit commands, use the humcat command to download to standard input (the -s option is needed when downloading multiple files):

   humcat -s h://mozart/sonatas | census -k

(There are 96637 notes in this data set, which is an average of 5685 notes per sonata, or 1895 notes per movement.)

Humdrum-data repository

This digital edition is also available in the Mozart directory of the Humdrum-data repository along with other digital scores in the Humdrum format.

Command-line processing

Using the included makefile

The makefile provided in the base directory includes example data processing commands. Type make when in the same directory as the makefile to list commands that can be run with the makefile:

Run this makefile with one of the following labels:
   "make update"      : download any new changes from online repository.
   "make reference"   : download PDF scans of reference editions.
   "make clean"       : delete data directories created by this makefile.

Commands requiring the Humdrum Toolkit to be installed:
   "make census"      : run the census command on all files.

Commands requiring Humdrum Extras to be installed.
   "make ctonic"      : transpose scores to C major/minor.
   "make keyscape"    : generate keyscape plots by movement.
   "make ckeyscape"   : generate keyscape plots by movement in C major/minor.
   "make midi"        : convert to MIDI files (full repeats)
   "make midi-norep"  : convert to MIDI files (no repeats)
   "make musedata"    : convert to MuseData files.
   "make musicxml"    : convert to MusicXML files.
   "make notearray"   : create notearray files.
   "make searchindex" : create themax search index.

Commands requiring other software to be installed.
   "make pdf-lilypond": convert to PDF files with lilypond.
   "make pdf-musedata": convert to PDF files with muse2ps.

If the make command does not work for you, then most likely it must be installed. In linux, the following command might install make:

   sudo apt-get install build-essential
   # or
   sudo yum install build-essential

In MacOS Mavericks or later, install the Xcode command-line tools by typing this command in the terminal:

   xcode-select --install

Most of the make targets also require Humdrum Extras to process the data. See https://github.com/humdrum-tools for instructions on downloading and installing it. A few other make targets require additional software to be installed, such as ImageMagick tools, muse2ps, lilypond, and verovio.

Creating absolute and relative keyscapes

If you have the Humdrum tools for command-line processing of the files installed (as well as the convert tool from ImageMagick), you can create plots of the key structure for each movement by typing the following command in the base directory of the repository:

make keyscape

Plots are store in the keyscape directory:

<img src="https://user-images.githubusercontent.com/3487289/41814701-529bd364-770a-11e8-95eb-82fcc8763224.png" width="800" />

Time goes from left to right in the plots, with the color mapping between keys and colors being:

<img src="https://user-images.githubusercontent.com/3487289/41814762-3ed4a48a-770c-11e8-9411-687dcfe661b8.png" width="500" />

Example keyscape from the first movement of the 14th sonata:

<img src="https://user-images.githubusercontent.com/3487289/41814769-7cafd22a-770c-11e8-91d4-2a69dfaa5489.png" width="800" />

This is a sonata-allegro form. The main key is C minor (dark green), and the second theme is in E-flat major (red). The black ticks at the bottom of the plot indicate the measures. The modulation to E-flat major occurs around measure 20.

Here is the opening of the movement:

<img src="https://user-images.githubusercontent.com/3487289/41814811-83b0c006-770d-11e8-9974-2d176ceb56c6.png" width="800" />

And at the transition to E-flat major:

<img src="https://user-images.githubusercontent.com/3487289/41814817-b0a92ac6-770d-11e8-8b1e-4defa6d39fb8.png" width="800" />

The recapitulation occurs around measure 100 (tick with a crossbar):

<img src="https://user-images.githubusercontent.com/3487289/41814844-5d2c4a08-770e-11e8-9251-537ee5c4f530.png" width="800" />

And the second theme is transposed to C minor in the recapitulation (so it is not differentiable in the keyscape since it is now in the same key as the first theme). The deveopment section lasts from about measure 70 to 100, where there are several small key regions at the bottom of the keyscape plot.

To create relative keyscapes of each movement (by transposing the music to C before generating the keyscape), type:

make ckeyscape

This will display the tonic key in green, blue is dominant, yellow is subdominant, etc.
Darker colors indicate minor keys.

<img src="https://user-images.githubusercontent.com/3487289/41814707-836844c8-770a-11e8-96e1-cfda435782a7.png" width="800" />

Downloading scans of the source edition

Scans of the source edition can be downloaded from kernScores with this command:

make reference

This will create a directory called reference-edition with a set of PDF files, one for each movement.

Creating MIDI files

To convert the Humdrum data files into MIDI files, type:

make midi

This will create a directory called midi containing the resulting MIDI files. These files contain the full repeats indicated in the music. To generate MIDI files that take only second endings (suitble for most types of analysis), instead type:

make midi-norep

This will generate MIDI files without repeats ("norep").

The total performance time of all sonatas, without breaks between movements and using the interpreted tempos in the data files, is 4 hours and 41 minutes, calculated with this use of Humdrum Extras:

thrux kern/*.krn | gettime -T

The longest movement is sonata 13, movement 1. Total duration of the data without taking repeats is 3 hours and 2 minutes, calcuated with the command pipeline:

thrux -v norep kern/*.krn | gettime -T