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 only sharp in the G major scale is F sharp, so the key signature associated with the G major key is the one-sharp key signature. However, it is only a notational convenience; a piece with a one-sharp key signature is not necessarily in the key of G major, and likewise, a piece in G major may not always be written with a one-sharp key signature; this is particularly true in pre-Baroque music, when the concept of key had not yet evolved to its present state. In any case, more extensive pieces often change key ("modulate") during contrasting sections, and only