When you play or analyze sheet music, you should first determine the key. There are several ways of doing this.
1. The Key Signature
From the key signature you can deduce a major and minor key.
If the key signature contains sharps, add a half step to the last sharp for the major scale. Substract 1½ steps from the major scale to get the minor scale.
There are 3 sharps: F#, C#, G#.
Add a half step to the last sharp to get the major scale: G# + ½ step = A.
To get the minor scale we have to substract 1½ steps of the major scale: A - 1½ steps = F#.
A music piece with 3 sharps in the key signature is in the key of A major or F# minor.
It's a little different with key signatures with flats. The last but one flat determines the major scale. Substract 1½ steps from the major scale to get the minor scale.
There are 4 flats, Bb, Eb, Ab and Db.
The second last flat is the name of the major scale: In this example it's Ab.
To get the minor scale we have to substract 1½ steps of the major scale: Ab - 1½ steps = F.
A music piece with 4 flats in the key signature is in the key of Ab major or F minor.
2. The final note
In many music pieces the melody ends in the tonic. If the melody ends in e.g. A, there's a good change the song is in the key of A.
3. The last chord
In a lot of music pieces we can determine the key by the last chord. If the piece ends in C major, there's a good chance C major is the key of the music piece.
The best way to determine the key is by combining the 3 examples above.
- Key signature: 1 sharp, the piece is in G major or E minor.
- The last melody note is G
- The last chord is G major
We can conclude that this piece of music is in the key of G.
- Key signature: 5 flats => Db major or Bb minor
- The last note is Bb
- The last chord is Bbmin
This piece is in the key of Bb minor.