A-flat major

A-flat major (or the key of A-flat) is a major scale based on A, with the pitches A, B, C, D, E, F, and G. Its key signature has four flats.
The A-flat major scale is:
\override Score.TimeSignature #'stencil = ##f
\relative c" {
 \clef treble \key aes \major \time 7/4 aes4 bes c des es f g aes g f es des c bes aes
 \clef bass \key aes \major
</score>
The relative minor is F minor. Its parallel minor, A-flat minor, is usually written instead as the enharmonic key of G-sharp minor, since A-flat minor contains seven flats and G-sharp minor only contains five sharps, making A-flat minor rarely usable. Its enharmonic, G-sharp major, with eight sharps, including the F, has a similar problem, and so A-flat major is often used as the parallel major for G-sharp minor. (The same enharmonic situation occurs with the keys of D-flat major and C-sharp minor.)
Compositions in A-flat major.
Beethoven chose A-flat major as the key of the slow movement for most of his C minor works, a practice which Anton Bruckner imitated in his first two C minor symphonies and also Antonín Dvořák in his only C minor symphony. The second movement of Haydn's 43rd symphony in E-flat major is in A-flat major. Chopin used this key in many of his works, particularly in his waltzes.
Since A-flat major was not often chosen as the main key for orchestral works of the 18th century, passages or movements in the key often retained the timpani settings of the preceding movement. For example, Beethoven's Symphony No. 5 in C minor has the timpani set to C and G for the first movement. With hand-tuned timpani, there is no time to re-tune the timpani to A-flat and E-flat for the slow second movement in A-flat; accordingly, the timpani in this movement are reserved for the passages in C major. In Bruckner's Symphony No. 1 in C minor, however, the timpani are re-tuned between the first movement in C minor and the following in A-flat major.
Charles-Marie Widor considered A-flat major to be the second best key for flute music.
A-flat major was the flattest major key to be used as the home key for the keyboard and piano sonatas of Domenico Scarlatti, Joseph Haydn and Ludwig van Beethoven, with each of them using the key for two sonatas: Scarlatti's K. 127 and K. 130, Haydn's Hob XVI 43 and 46, and Beethoven's Op. 26 and Op. 110, while Franz Schubert used it for one piano sonata. It was also the flattest major key to be used for the preludes and fugues in Johann Sebastian Bach's "Well-Tempered Klavier", as flatter major keys were notated as their enharmonic equivalents.
Felix Mendelssohn, Johann Nepomuk Hummel, John Field, and Friedrich Kalkbrenner each wrote one piano concerto in A-flat (Mendelssohn's being for two pianos); they had the horns and trumpet tuned to E-flat. Max Bruch's Concerto for Two Pianos in A-flat minor has its last movement in A-flat major, which is the parallel major; this concerto plays with the contrast between the two keys.
Scott Joplin's Maple Leaf Rag is also written in A-flat major (the trio part of the composition is written in D-flat major).
Other compositions in A-flat major include: