Starting around 1900, composers began experimenting with departures from tonal and modal music as we know it. The best known experiments came from the so-called Second Viennese School, made of up Arnold Schönberg, Alban Berg, and Anton Webern, who wrote using what was called atonality, the serial twelve-tone scale—all twelve tones between C and the C an octave above it sounded chromatically. The experiment, which went on for a number of years and got a lot of attention, essentially ended up being a failure. Today little music by the Second Viennese School of composers is still performed.
Harmonic rules in tonal music dictate the use and order of appearance of chords called triads (the root note, third, and fifth all sounded simultaneously). The triads in any key are named for the root tone upon which they are built: tonic, supertonic, mediant, subdominant, dominant, submediant, and leading tone (or if that tone is lowered by a semitone, it’s called the subtonic). These chords are commonly referred to by the Roman numeral assigned to them, starting with I for the tonic, II for the supertonic, etc.
The use and order of the triads follow rules established by usage ever since Bach’s time. The dominant, for example, usually leads to the tonic. The rules are so many and complex that thick volumes have been written documenting them.
And all that’s just the beginning. Musical logic remains a study unto itself, unrelated to any other discipline. Though I once hoped to escape my vocation (writing) by studying music—I took a BA in it—music through most of my life has been a secondary attraction. But it is and remains a source of joy for me.