The use of more than two keyss at once is known in music as polytonality. Bitonality is the use of only two different keys at the same time.

A well known example is the fanfare at the beginning of Igor Stravinsky's ballet, Petrushka. The first clarinet plays a melody in C major, while the second clarinet plays the same melody in F sharp major:

Although this example consists of just two melodic lines, some examples of bitonality contrast fully harmonised sections of music in different keys. Examples of this rather more dissonant kind of bitonality can be found in the work of Charles Ives, whose use of the technique in his Variations on "America" (1891) is one of the first in classical music. Earlier examples, such as Wolfgang Amadeus Mozart's Ein musikalischer Spass, tend to use the technique for comic effect.

Bitonality was used quite often by members of the French group, Les Six, and especially by Darius Milhaud, who perhaps used it more than any other composer. Many composers today who are interested in using tonality are also interested in bitonality, such as Philip Glass in his Symphony No. 2.

Although the word bitonality is most often used when talking about relatively modern classical music (written in the last one hundred years or so), it is quite a common technique in folk music, especially in eastern Europe.