Those who choose to learn how to play piano may have encountered some confusion when learning about keys, due to those things you strike with your fingers which bear the same name, but when talking about how music is produced it is necessary to cover the basics of the theoretical notion of “key”. In this context, the word “key” refers to the key the music is played in and not the black and white blocks of wood your fingers strike on the keyboard.
If you have watched a music performance by a band in a lounge or bar, you may have heard the band mention the “key” in which the piece is performed. Keys of music tracks are typically major or minor (but there are others). Major keys are usually bright sounding and happy, while minors are “gloomy”. Keys derive from musical scales, but we will save this complex theory of another article.
In terms of sheet music the key signature is a grouping of sharps or flats depicted on the staff on the left hand side of the page. If there are no sharps or flats on the staff then the piece is in the key of C major. The important thing to know are the notes that make a “sharp” or a “flat” when you translate from the notes of the sheet music to the physical keys on the keyboard.
When it comes to determining a key signature for a major key, knowing whether there are sharps or flats in the key is crucial. Only the keys of C and F do not have sharps in the key, so if a sharp is featured on a music staff in sheet music, the key can be assumed to be either G, D, A, E, B, F# or C#. If a sharp follows the letter name, then the key signature will of course feature sharps, while if a flat follows the letter name the key will feature flats.
To determine the name of a major key that has starts within it, you can use a simple method: name the note that is half a step above the last sharp, so in the case of four sharps in the staff, the key is E major (as the last sharp is D#). Similarly to determine the name of a major key that has flats in it, another method you can use is to name the second last flat in the music staff which will the the name of the key.
It is important when reading sheet music to look at the key signature on the left hand side of the staff and after the clef symbol. It is displayed as either zero or more sharp (#) or flat (b) symbols over a line or space. Ordinarily these sharps or flats are played throughout a piece, so if you are playing a piece of music in the key of “F”, then every “B” note displayed on the staff equates to a Bb (B flat) and not written beside the note. Sometimes the key signature can change during the piece which will be denoted by a new key signature and a new clef sign (which can also change during a piece).
When you are just learning how to play the piano, just remember to use the key signature to tell you what notes to play flat or sharp throughout the whole piece. In time you will get used to seeing key signatures and it will make more sense.