In classical music, a fugue is a contrapuntal, polyphonic compositional technique in two or more voices, built on a subject that is introduced at the beginning in imitation, which recurs frequently throughout the course of the composition. It is not to be confused with a fuguing tune, which is a style of song popularized by and mostly limited to early American music and West Gallery music. A fugue usually has three main sections: an exposition, a development, and a final entry that contains the return of the subject in the fugue's tonic key. Fugues can also have episodes—parts of the fugue where new material is heard, based on the subject—a stretto, when the fugue's subject "overlaps" itself in different voices, or a recapitulation. A popular compositional technique in the Baroque era, the fugue was fundamental in showing mastery of harmony and tonality as it presented counterpoint.
Example of a tonal answer in J.S. Bach's Fugue No. 16 in G minor, BWV 861, from the Well-Tempered Clavier, Book 1. The first note of the subject, D (in red), is a prominent dominant note, demanding that the first note of the answer (in blue) sound as the tonic, G.
The interval of a fifth inverts to a fourth (dissonant) and therefore cannot be employed in invertible counterpoint, without preparation and resolution.
Visual analysis of J.S. Bach's Fugue No. 2 in C minor, BWV 847, from the Well-Tempered Clavier, Book 1 (bars 7–12)
In music, counterpoint is a method of composition in which two or more musical lines are simultaneously played which are harmonically correlated yet independent in rhythm and melodic contour. It has been most commonly identified in the European classical tradition, strongly developing during the Renaissance and in much of the common practice period, especially in the Baroque period. The term originates from the Latin punctus contra punctum meaning "point against point", i.e. "note against note".
Example of a double passing tone in which the two middle notes are a dissonant interval from the cantus firmus, a fourth and a diminished fifth
Example of a descending double neighbor figure against a cantus firmus
Example of an ascending double neighbor figure (with an interesting tritone leap at the end) against a cantus firmus