Joseph Haydn wrote many Piano Sonatas and this is the first movement of his sonata No. 31 in A-flat. The video below lets you see the sheet music being played in Sibelius, and below that you can play the mp3 file and see the sheet music before downloading.
Since Haydn was influential among composers in establishing Sonata Form, it is useful to use this piece to outline the basic principles. The purpose of the "Exposition" which last until the repeat sign after bar 38 is to set out the themes. The main theme starts on bar 1 in A-flat and a secondary theme begins at bar 18 and is mostly in the key of E-flat. After the repeat bar, the "Development" section starts with the main theme in E-flat and develops a number of ideas from the Exposition and in particular expands in bars 49-64 upon a short 2-bar figure from the exposition. The "Recapitulation" returns to the main theme in the home key of A-flat but changes course so that when the second theme is re-stated it is also in the key of A-flat, and the work now ends in the home key giving a sense of finality. For more piano sonatas by Haydn try one or more of the following volumes:
Here is a video of Haydn's Piano Sonata No.31 in A-flat (1st movement):
The audio controls below allow you to play the mp3 version of Haydn's Piano Sonata No.31 in A-flat (1st movement) or you can download the MP3 file. You can also download the midi version of Haydn's Piano Sonata No.31 in A-flat (1st movement).
The image below is the first page of the sheet music, and here you can download the full sheet music for Haydn's Piano Sonata No.31 in A-flat (1st movement) in PDF format.