What Some Dead White Guy Did: A Statistical Topology
Of Keyboard Usage In Beethoven's Sonatas For Pianoforte

Topology Of The Keyboard

The data collected through the analysis of key usage in Beethoven's piano sonatas, found in the paper elsewhere in this journal, has been used to create the set of heat-maps shown below. The advantage of using heat-maps is that they put the data in situ and allow conclusions to be drawn about how hand placement and key arrangement may affect the spread of notes.

Heat-maps are a way of graphically representing the values of a data set that is spatially arranged through the assigning of colour intensities. A well-known example of a heat-map is thermal imaging, where different colours are used to represent the temperature of different objects.

In this study, the heat-maps show the amount of time a key is depressed over the course of a sonata. For keys which are not pressed at all, the colour white is used (RGB value: 255 255 255). The key that is depressed for the most amount of time in each sonata is bright red (RGB value: 255 0 0), and the colour intensities of all keys are linearly extrapolated between these two values for each sonata.

In order for some conclusions to be drawn about Beethoven's developing use of the piano keyboard, the ordering of the diagrams has been altered in order to put them in chronological order as far as possible. This meant relocating sonatas 20 and 19, as these were both written earlier than their numbering suggests.

The size of the heat-map keyboards encompass the range of a modern piano, however a difference has been made between the outlines of the keys – those with a darker outline illustrating the compass of the size of piano it is presumed the work was written for, and those with a lighter outline implying keys that would lie outside of that range.

Click to view in a new tab
Click to view in a new tab

The data collected through the analysis of key usage in Beethoven's piano sonatas, found in the paper elsewhere in this journal [LINK], has been used to create the set of infographics shown below. In these diagrams, the size of each key on the piano keyboard is directly related to its key usage in each sonata.

In order to do this, the keys were scaled according to area. The creation of the keyboards was done using lisp code in emacs to output scalable vector graphics files (.svg).

The code uses three parameters in building the keyboards:

  1. A minimum area that no key could fall below – this is the area that can be seen when a key is not used at all.

  2. The width and height of the keyboard - all of the keys are proportionally scaled to this size, making the size of the keyboard for each sonata equal.

As the scaling of the keys is based around the area the key covers, rather than the width of the key, some special rules in the code had to be developed to compensate for the displacement of white keys that could happen when an adjacent black key is vastly larger. In this situation, if the height of the black key is kept the normal length of 2/3rds that of the white key, the discrepancy in area between the two keys will mean that the white key will not have enough area to cover the width of the black key and reach to the front edge of the keyboard. In order to avoid this, when such discrepancies occur, the black key will instead extend forwards towards the front of the keyboard until the point at which the white key is left enough area to stay at its normal length. This is why some of the black keys are different lengths, including some extreme cases where the discrepancy in size between the black key and adjacent white keys is so large that it extends fully to the front edge of the keyboard.