The fantasia (from Italian: fantasia; also English: fantasy, fancy, German: Fantasie, French: fantaisie) is a musical composition with its roots in the art of improvisation. Because of this, it seldom approximates the textbook rules of any strict musical form (as with the impromptu).
In the Baroque and Classical music eras, a fantasia was typically a piece for keyboard instruments with alternating sections of rapid passagework and slower, more melodic passages. From the Baroque period, J. S. Bach's Chromatic Fantasia and Fugue, BWV 903, for harpsichord; Fantasia and Fugue in G minor, BWV 542, for organ; and Fantasia and Fugue in C minor, BWV 537, for organ are examples. For an example from the Classical period, see Mozart's Fantasia in D minor, K. 397 for fortepiano. In contemporary music, Busoni's Fantasia Contrappuntistica or Corigliano's Fantasia on an ostinato are examples of a fantasia.
The term also referred in the Baroque era (more specifically British Tudor music) to pieces for viols, characteristically- though not always- alternating, in this case rapid fugal sections with slower sections in slow notes and sometimes clashing harmonies. According to the Oxford Concise Dictionary of Music's entry the instrumental fantasia was closely related in its history and form to the motet. Henry Purcell's fantasias are the last Baroque representatives of the breed, although Walter Willson Cobbett, in the opening decades of the 20th century, attempted to resurrect something of this style via a competition, to which works like John Ireland's and Frank Bridge's phantasie-trios, Benjamin Britten's phantasie-quartet (for oboe and strings) and other music owe their existence.
In the Romantic period, two contradictory trends greatly affected the fantasia: one was the decline of formal improvisation as a test of the compositional technique; the other was the move by composers toward freer forms. Chopin's Fantasy in F minor op. 49, combines various keyboard textures of the stile brillante with the classical sonata paradigm, resulting in a work of unorthodox but sophisticated form. Schumann's numerous 'fantasy pieces' are character works on a smaller scale, often bearing descriptive titles. Mussorgsky's Night on Bald Mountain is also piece of fantasia.
English Chamber Music by Ernst Hermann Meyer. Reference on the early English fantasy (fantazy, fantasie, fantasia.) Lawrence & Wishart, London, 1946. (Was republished by Da Capo Press, 1971, with ISBN 0-306-70037-9.)
Fantasies by Mozart and Schubert performed by Daniel Blanch . Ars Harmonica AH 140