Little is known about Hungarian music prior to the 11th century, when the first Kings of Hungary were Christianized and Gregorian chant was introduced. During this period a bishop from Venice wrote the first surviving remark about Hungarian folk song when he commented on the peculiar singing style of a maid. Church schools in Hungary taught Western Christian chanting, especially in places like Esztergom, Nyitra, Nagyvárad, Pannonhalma, Veszprém, Vác and Csanád; and later schools began focusing on singing, spreading Latin hymns across the country.
Information about music education during this period is known thanks to manuscripts such as the Notebook of László Szalkai, Jacobus de Liège's Speculum musicae (c. 1330-1340, which mentions the use of solmization), the Hahót Codex, the Codex Albensis and the Sacramentarium of Zagreb. The Pray Codex is a collection of "liturgical melodies ... in neumatic notation ... containing among other things the earliest written record extant of the Hungarian language, the Funeral Oration, ... independent forms of notation and even independent melodies (Hymn to Mary)".
The first known example of exchange between Hungarian and Western European music is from the 13th century, the "first encounter with the more secular melodic world of the Western world".
The earliest documented instrumentation in Hungarian music dates back to the whistle in 1222, followed by the koboz in 1326, the bugle in 1355, the fiddle in 1358, the bagpipe in 1402, the lute in 1427 and the trumpet in 1428. Thereafter the organ came to play a major role.
Though virtually nothing is known about them, Hungarian minstrels existed throughout the Middle Ages and may have kept ancient pagan religious practices alive. At the Synod of Buda in 1279 the church banned their congregation from listening to them, despite their having come to be employed by noblemen in courts. By the 14th century instrumental music had become their most important repertoire and minstrel singers had become known as igric. The golden age of courtly music (which had followed French models for most of the early Middle Ages before musicians from Flanders, Italy and Germany arrived) was during the reign of Matthias Corvinus and Beatrice.
The Nádor Codex of 1508 presents the first use of Gregorian melodies with Hungarian texts. The same period saw the local folk styles grow more diverse, while political authorities railed against secular music. Szavolcsi notes the author of the Sándor Codex (early 16th century), who described secular music as accompanied by "fiddle, lute, drums and cimbalom... and used tenor, discant and contratenor" singers, meaning it was in the style of the motet.
The 16th century saw the rise of Transylvania, a region the Turks never occupied, as a center for Hungarian music, as well as the first Hungarian publications of music, both published in Kraków. István Gálszécsi's songbook was the "first Hungarian gradual to the Gregorian hymn-melodies and German choral music of which we can see new Hungarian translations", while the Cronica of András Farkas includes the first surviving historical song. About forty melodies are known from this era, and are already in a distinctively Hungarian style which took influences from across much of Europe in several dozen distinct forms that were "mostly notated in a rigid and clumsy way" but were "undoubtedly much more colourful and flexible in living performance" and were in reality "little masterpieces of melodic structure". The most significant musician of this period was Sebestyén Tinódi Lantos, the "greatest stylist and master of expression of ancient Hungarian epic poetry... whose heritage the people's music of two centuries was unconsciously nourished".
Accentuated declamation was fashionable in music education during the early 16th century; a more rigid choir style is represented by a collection called the Melopoeiae, from 1507. A collection by Johannes Honterus was the first Hungarian printed work with music, dating from 1548. These collections were enriched by "melodic configurations" that, according to Bence Szabolcsi, could be explained by the arrival of the "song material of the Czech Reformation, the melodic treasure of the German Reformation and the psalter of French Huguenots". The poet Bálint Balassi remains well regarded for his poems from this period, which were based on Polish, Turkish, Italian and German melodies, and may have also been influenced by the villanella. Some songs from this period, influenced by the music of the nobles and their minstrels from as far away as Italy, remained a part of the Hungarian folk tradition at least until modern song collection began. Religious and secular music were closely connected at this time, and documentation of the former grew with the publication of many songbooks filled with free psalm paraphrases called lauds, facilitating the practice of communal singing among the nascent Protestant churches. This conflation of religious and secular song was much criticized from the pulpit, from both the Protestant and Catholic churches. The latter allowed popular songs after a 1564 edict from Ferdinand I, which allowed the bishops to use them only after close scrutiny. They were again banned in 1611, however, and a Catholic collection of Hungarian church songs was not agreed upon until 1629, at the Synod of Nagyszombat. The collection, Benedek Sz?l?sy's Cantus Catholici, was published in 1651, and wasn't followed by a Protestant version for about 90 years.
Hungarian instrumental music was well known in Europe in the 16th century. The lutenist and composer Bálint Bakfark was especially famous, known as a virtuoso player of the lute; his works were collected and published as Intavolatura and Harmoniae musicae (published in 1553 and 1565 respectively). He was one of the pioneers of a style based on vocal polyphony. The lutenist brothers Melchior and Konrad Neusiedler were also noted, as was Stephan Monetarius, the author of an important early work in music theory, the Epithoma utriusque musices.
During the 17th century, Hungary was divided into three parts, one the region of Transylvania, one controlled by the Turks, and another by the Habsburg. Historic songs declined in popularity, replaced by lyrical poetry. Minstrels were replaced by courtly musicians, who played the trumpet and whistle, or cimbalom, violin or bagpipes; many courts and households had large groups of instrumentals. Some of these musicians were German, Polish, French or Italian, and even included a Spanish guitarist at the court of Gábor Bethlen, Prince of Transylvania. Little is known about the actual music of this time, however.
Instrumental music from the 17th century is known from the collections of various Upper Hungarian and Transylvanian collectors, such as János Kájoni, who collected the Cantionale Catholicum, Kájoni Codex, Organo Missale and Sacri Concentus. The collectors of the Vietórisz Codex, whose identities are unknown, and another anonymous collector from L?cse, also published "the first examples of autonomous, developed virginal music, equally accomplished in style, melodic texture and technique of adaptation". These songs were characterized by "flexible, finely shaded melodies, a tendency to create wider and looser forms, and a gradual independence of the forma (sic) principles of song melodies toward a clearly instrumental conception". At the same time, rhythm became more complicated and notation more general. The L?cse manuscript also notably presents an arrangement of dances, the first example of the Hungarian cyclic form; this music and dance had similarities both to the Polish music of the time as well as the subsequent development of the verbunkos style.
17th century Hungarian church music was revolutionized after the 1651 publication of the Cantus Catholici, in which genuine Hungarian motives played a major part. By 1674, the Hungarian Mass was also part of the Cantus Catholici, followed by the adoption of Calvinist psalm tunes in 1693 and Hungarian choral music in 1695. János Kájoni Organo Missale of 1667 was the first experiment in the creation of a new kind of Hungarian church music, a style that strung together short motives that were shortened, extended or syncopated in a complex rhythmic structure. Italian religious music played an important role in this development, which was documented in an "unparalleled example of ancient Hungarian music", the Harmonia Caelestis of Prince Pál Eszterházy, who tried to create a distinctively Hungarian style of church music using influences from opera, oratio literature, the German music of Johann Kaspar von Kerll and Johann Schmeltzer, and the oratorio and cantata styles. Eszterházy's efforts did not last, as the following century saw an influx of muic from Western Europe under the Habsburgs.
Around the start of the 18th century, however, the last national uprising of the period occurred, leading the spread of "Kuruc songs". These songs were authentically Hungarian and hold a "central position between the style of the ancient and the new folk music". Their influences include elements of Polish, Romanian, Slovak and Ukrainian music in addition to Hungarian melodies.
During the 18th century, students at Hungary's Calvinist colleges, some of whom, being minor nobles, lived in small rural villages, brought with them to their schools their regional styles of music. Colleges like Sárospatak and Székelyudvarhely developed choirs that adopted new elements like polyphony. György Maróthi of Debrecen published several influential works, and his French psalm book became very popular. By around 1790, the four voice choirs were expanded to eight using accessory voices like accantus, subcantus and concantus, and the discant voice was systematically transpoed into a lower pitch, producing a new form of choral design with similarities to medieval organum and fauxbourdon. The same period saw the popularity of homophoning songs which are recorded in the students' song books; notation, however, was crude, and no extensive collection appeared until 1853, with the publication of Ádám Pálóczi Horváth's Ötödfélszáz Énekek. These songs show that the mid to late 18th century was a period when the old Hungarian styles died out, and a new style appeared.
Many Hungarian musicians and composers of the 18th century preached closer cultural ties with Europe, not believing that Hungarian music could reach the levels of development in Italy and Germany. The aristocracy were interested in the court music of Louis XIV, like the minuet and rondo. Many of these people tried to popularize Viennese-style songs with Hungarian texts, or to use German and Italian forms; these people included the poet László Amadé, novelist Ignác Mészáros and the author and linguist Ferenc Verseghy. Hungarian music did, however, have an effect on composers from elsewhere in Europe. Joseph Haydn's Rondo all' Ongarese (from the Trio in G major (No. 1)), is an example, as is the finale of Beethoven's Symphony No. 3 (Eroica), which uses a Magyar march, and Symphony No. 7, which is a 2/4 tempo with a syncopated rhythm. Beethoven also used Hungarian idioms in the prologue of King Stephen and the epiloque for Ruins of Athens.
The 18th century also saw the rise of verbunkos, a form of music that was used by army recruiters. Like much of Hungarian music at the time, it was focused on the melody, with a subordinate text; in spite of this, the vocals became a major part of verbunkos.
By the middle of the 19th century, verbunkos was a major symbol of Hungarian culture, and numerous people published groundbreaking studies and collections of the field. The Musicians' Society National School of Music in Pest, headed after 1840 by Gábor Mátray, one of the "leading personalities of Hungarian musical life", did much to encourage this study.András Bartay's 1835 study of Hungarian harmonics, Magyar Apollo and his 1833-34 Eredeti Népdalok, were pioneering works in the field.
In 1838, a young Franz Liszt was inspired to travel home to Hungary, studying the music of the country; he would go on to incorporate what he learned in many of his world-famous compositions. Other composers from this period included Béni Egressy, who used 18th century folk songs in his compositions, Kálmán Simonffy, who was the "most original and most inventive" songwriter of the era, whose works "most nearly approached the ideal of 'popular melodic culture', as well as lesser-known figures like Gusztáv Szénfy, Gusztáv Nyizsnyai and Ignác Bognár. In spite of their desires to glorify Hungarian folk culture, the music these composers used remained primarily the music of the middle and upper classes. It was not until the very end of the 19th century and into the 20th that the authentic music of ethnic Hungarians became a major part of compositions. Other Hungarian composers did not attempt to use verbunkos or other Hungarian styles in their music. German music was a much stronger influence on the music of the Catholic Church and in the songbooks of Mihály Bozóky.
The playwright Elemér Szentirmay (also known as János Németh) was very popular in his time, known for his "form of expression and scale of popular character" whose "works surpassed in popularity everything written by his contemporaries". The Hungarian operetta first appeared in the 1860s, popularized by Ignác Bognár, Geza Allaga and Jeno Huber, followed by Elek Erkel and György Bánffy; in the early 20th century, the Viennese style predominated in the work of Huszka, Pongrác KacsóhKacsóh, Buttykay, Jacobi, Kálmán and Lehár. Aside from the popular operetta, the field of Hungarian opera reached fruition in the 19th century. Ferenc Erkel was of great importance in his field, creating the first opera in the Hungarian language using music from popular songs, the verbunkos tradition as well as the singing forms of Italian and French opera. There were other opera composers as well, though the most important was Mihály Mosonyi, who did much to use Hungarian themes in his work.
The late 19th century saw a decline in the nationalistic tendencies of Hungarian music, which deteriorated "into the works of salon composers, into the poorly written genre of stylish 'Hungarian fantasies', 'Gipsy arrangements'" and other styles more influenced by foreign countries than Hungarian traditions. The result was increased antagonism between those enamoured of foreign music and the cultivators of Hungarian (and Roma-Hungarian) music, a dichotomy that "could only result in deceiving the country with the opium of semi-education on the one hand and superficial nationalism on the other".Hans Koessler, a teacher with the Academy of Music, did more than anyone to accentuate the German classical elements in Hungarian music, though some of his students, like Ernst von Dohnányi, placed prominent Hungarian themes in their own works.