Key signature key signatures showing sharps or flats on both octaves for notes which fall within the staff. An accidental is an exception to the key signature, applying only to the measure and octave in which it appears. Although a key signature may be written using any combination of sharp and flat symbols, the most common series of thirteen homogeneous key signatures—ranging from six flats to six sharps, with each successive flat or sharp placed on the note a perfect fifth below or above, respectively, the previous one—is assumed in much of this article. A piece scored using a single diatonic key
Key signature require seven flats in their key signature. (The second appearance later in the movement of this same section, a semitone lower, in G minor, uses the correct key signature of two flats.) In principle, any piece can be written with any key signature, using accidentals to correct the pattern of whole and half steps. The purpose of the key signature is to minimize the number of such accidentals required to notate the music. The sequence of sharps or flats in key signatures is generally rigid in modern music notation. This allows musicians to identify the key simply by the number