All tonal music is based on a major or minor scale. If the tune “Twinkle, twinkle little star” is played starting on the note C, the notes of a C major scale will be used. The note C will sound like the home note (the “tonic”) and, indeed, the tune finishes on a C. The tune could have started on any other note (C sharp, D, E flat, E etc.) but a knowledge of scales would be needed as some sharps or flats (black notes) will be required. When singing the tune there is no need to think about the sharps and flats: the singer does them quite naturally.
A piece of tonal music will usually modulate after a while. This means that it changes key. But the music will not sound finished until it goes back to the original key. If one sings The Star-Spangled Banner and stops after the words “our flag was still there” the song sounds as if it has stopped in mid-air. It will not sound finished until it goes back to the first key in the last two lines.
Most Western music from about 1600 onwards is based in a major or minor key. This system of tonality was used by all the great composers up to the 20th century and in popular music and most folk music. Listening to a symphony by Beethoven is like going on a journey through various key areas, always returning to the original tonic at the end. In some cases, such as Beethoven’s Fifth Symphony, it may start in the minor and finish in the major. This is because minor keys can sound disturbed, full of tension, but major keys sound happier and more relaxed.
The opposite of “tonality” is atonality. An atonal piece is one where there is no feeling of a home key. Playing lots of random notes will sound atonal. Schoenberg was one of the most famous composers of atonal music. Of course, his music is not just random notes (although it may sound like it to the listener at first), so he had to find another way of giving his music shape. That is why he invented the twelve-tone system.
Tonality Facts for Kids. Kiddle Encyclopedia.