A fantasia (; also English: fantasy, fancy, fantazy, phantasy, , Phantasie, ) is a musical composition with roots in improvisation. The fantasia, like the impromptu, seldom follows the textbook rules of any strict musical form. History The term was first applied to music during the 16th century, at first to refer to the imaginative musical "idea" rather than to a particular compositional genre. Its earliest use as a title was in German keyboard manuscripts from before 1520, and by 1536 is found in printed tablatures from Spain, Italy, Germany, and France. From the outset, the fantasia had the sense of "the play of imaginative invention", particularly in lute or vihuela composers such as Francesco Canova da Milano and Luis de Milán. Its form and style consequently ranges from the freely improvisatory to the strictly contrapuntal, and also encompasses more or less standard sectional forms. One of the most important composers in the development of the fantasia was Jan Pieterszoon Sweelinck. His greatest work in this style is the Fantasia Chromatica (a specific form called 'chromatic fantasia'), which in many ways forms a link between the Renaissance and the Baroque. Renaissance and Baroque According to the Oxford Dictionary of Music, in the 16th century the instrumental fantasia was a strict imitation of the vocal motet. Polyphonic solo fantasias were widely composed for the Lute & early keyboards. Composers such as William Byrd & Orlando Gibbons wrote many surviving keyboard fantasias, while also expanding the genre with outstanding examples for recorders & viols. In addition to Byrd & Gibbons, composers John Coprario, Alfonso Ferrabosco, Thomas Lupo, John Ward, and William White continued to expand the genre for viol consort while examples by William Lawes, John Jenkins, William Cranford, Matthew Locke, and Henry Purcell are regarded as highly exceptional from the late 17th-century. The form expanded in scope during the Baroque period with works ranging from J. S. Bach's Chromatic Fantasia and Fugue, BWV 903, for harpsichord; Great Fantasia and Fugue in G minor, BWV 542, for organ; and Fantasia and Fugue in C minor, BWV 537, for organ are examples. Georg Philipp Telemann published Twelve Fantasias for Solo Flute in 1733, and Twelve Fantasias for Solo Violin and Twelve Fantasias for Viola da Gamba solo in 1735. Classical and Romantic Examples from the Classical period are Mozart's Fantasia in D minor, K. 397 for fortepiano and his Fantasia in C minor, K.