


This convention was not universal until the late Baroque and early Classical period-music published in the 1720s and 1730s may have key signatures showing sharps or flats in both octaves for notes which fall within the staff. Each symbol applies to all notes in the same pitch class-for example, a flat on the third line of the treble staff (as in the diagram) indicates that all notes appearing as Bs are played as B-flats. This applies through the end of the piece or until another key signature is indicated. In a key signature, a sharp or flat symbol on a line or space of the staff indicates that the note represented by that line or space is to be played a semitone higher (sharp) or lower (flat) than it would otherwise be played. If the piece contains a section in a different key, the new key signature is placed at the beginning of that section.

The initial key signature in a piece is placed immediately after the clef at the beginning of the first line. In Western musical notation, a key signature is a set of sharp ( ♯), flat ( ♭), or rarely, natural ( ♮) symbols placed on the staff at the beginning of a section of music. Key signature showing B ♭ and E ♭ (the key of B ♭ major or G minor) Key signature showing F ♯ and C ♯ (the key of D major or B minor) For use in cryptography, see Key signature (cryptography).
