Dance music is music composed, played, or both, specifically to accompany dancing. It can be either the whole musical piece or part of a larger musical arrangement.
Dance music includes a huge variety of music, including traditional dance music such as Irish traditional music, waltzes, rock and roll, country music and tangos. An example of traditional dance music in the United States is the old-time music played at square dances and contra dances.
Very early music contains many dance forms like the Branles or Estampie.
In the Baroque period, the major dance styles were noble court dances, which were often derived from folk dances. Examples include the allemande, courante, sarabande, and gigue.
In the Classical music era, the minuet gained dominance, usually as a third movement in four-movement non-vocal works such as sonatas, string quartets, and symphonies. The waltz also arose later in the Classical era, as the minuet evolved into the scherzo (literally, "joke"; a faster-paced minuet).
Both remained part of the Romantic music period, which also saw the rise of various other nationalistic dance forms like the barcarolle, mazurka, and polonaise. Also in the Romantic music era, the growth and development of ballet extended the composition of dance music to a new height. Frequently dance music was a part of Opera.
The 20th century saw the rise of Modern Dance and also other popular dance forms, sometimes jazz-based or -related, such as the ragtime. As 20th century classical music headed toward more dissonant and non-traditional directions with tonality, frequently dance music provided a cutting edge path for these changes, like Stravinsky's ballet, the Rite of Spring or the work of John Cage for modern dance. Popular genres began to take up the need for social dance music, and produced numerous duple and quadruple dance forms.
From the late 1970s, the term dance music has come to also refer (in the context of nightclubs) more specifically to electronic music offshoots of rock and roll, such as disco, house, techno and trance. Generally, the difference between a disco, or any dance song, and a rock or general popular song is that in dance music the bass hits "four to the floor" at least once a beat (which in 4/4 time is 4 beats per measure), while in rock the bass hits on one and three and lets the snare take the lead on two and four (Michaels, 1990).