A key signature is a set of sharps and flats typically written at the beginning of a composition. Key signatures let musicians know what notes are to be played as sharps or flats throughout the composition or for a specific section. If a key signature is placed anywhere else other than at the beginning of the composition, then it signals a key change or modulation to a different key (tonal center) until a new key signature is reached.
Key signatures simplify notation by allowing the composer to specify a default value for notes without having to write an “accidental” (explicit sharp or a flat symbol) in front of each note. For example, in the following illustration, the second and last notes are played as F# because the key signature indicates this with a single sharp on the F line:
If the key signature had been omitted, then the composer would need to use a separate sharp in front of each note to represent the same note values:
Key signatures reduce the amount of symbols that performers have to read and interpret while playing at tempo.
The following illustration shows all of the key signatures and the corresponding number of sharps or flats that defines each key.
An “accidental” is a sharp of flat symbol written in front of a note. Its purpose is to override the value specified by the key signature for the rest of the measure.
A natural is used to cancel a previous accidental in the same measure. In the following example, the first note is a C natural; the second note is raised by a half step because it is preceded by a sharp symbol so it is played as a C sharp (C). The third note is still played as a C even though it is not explicitly preceded by a sharp symbol because the previous sharp is still in effect. The fourth note is lowered back to a C natural because the previous sharp symbol is canceled by the natural sign.
When the end of the measure is reached, then it terminates any accidentals (sharps or flats) contained in that measure. Notation rules do not require that any explicit natural symbols be written to cancel accidentals at the start of a new measure but some composers will include a natural to remind performers that the previous accidentals are no longer in effect. These are sometimes referred to as courtesy or cautionary accidentals and are usually surrounded by parentheses, for example:
Other notation symbols for accidentals are the double sharp () and the double flat () and the natural (). The double sharp is used to raise a note by two half steps (a whole step) and the double flat is used to lower a note by two half steps (a whole step).