Key signature may consist of one or more sharps combined with one or more flats (such as a signature containing both F and B). Key signatures of this kind can be found in the music of Béla Bartók, for example. The effect of a key signature continues throughout a piece or movement, unless explicitly cancelled by another key signature. For example, if a five-sharp key signature is placed at the beginning of a piece, every A in the piece in any octave will be played as A sharp, unless preceded by an accidental (for instance, the A in scale 2 illustrated –
Key signature sometimes is this change indicated with a change of key signature; if not, the passage in the second key will not have a matching key signature. The Toccata and Fugue in D minor, BWV 538 by Bach has no key signature, leading it to be called the "Dorian", but it is still in D minor; the Bs that occur in the piece are written with accidentals. Keys which are associated with the same key signature are called relative keys. When musical modes, such as Lydian or Dorian, are written using key signatures, they are called "transposed modes". Exceptions to common-practice-period