If a piece is made up of the notes of a certain scale, we say that the piece is in the key of that scale, and the first note of the scale is the key note of the piece. For example, the piece in Figure 32 is in D major, because it uses the notes of the D major scale:
Generally, the necessary sharps and flats are not written separately before each note that needs to be sharpened or flattened. They are usually written at the beginning of each line of music, after the clef. This makes the score easier to read. The melody above would normally be written as shown in Figure 33:
The sharps and flats written after the clef are the key signature of the piece. In the example above, notice that only one F note is marked with a # in the key signature — that is, the F note on the 5th line; in addition, only one C note is marked with a # — that is, the C note in the 3rd space. This is because the sharps and flats in a key signature apply to all notes of the same letter name throughout the piece. Therefore, all three F notes in the melody will become F #, and both C notes will become C # .
Figure 34 shows all the scales in the Grade 1 course. Here, the ascending and descending scales in both the treble clef and the bass clef are shown with whole notes, and the semitones are marked with the ┌─┐ (box) symbol. The first scale is C major, so it has no key signature. The other scales appear in both forms: with a key signature and without a key signature.
Look carefully at Figure 34 and notice how the key signatures are arranged. The sharps and flats must be written on the exact lines and spaces according to the clef. Figure 35 shows:
the layout of the key signatures for G major, D major and F major in both the treble clef and the bass clef.