The music of Slovenia is closely related to Austrian music because of its common history and Alpine and littoral culture. Croatian and Northern Italian music from the regions close to Slovenian border also bear some resemblance to Slovenian music. In the minds of many foreigners, Slovenian folk music means a form of polka that is still popular today, especially among expatriates and their descendants. However, there are many styles of Slovenian folk music beyond polka and waltz. Kolo, lender, štajeriš, mafrine and šaltin are a few of the traditional music styles and dances.
The Divje Babe flute, an artifact found in a cave near Cerkno, Slovenia, is possibly the oldest known musical instrument ever. Its age is estimated at approximately 55,000 years.
The history of modern Slovenian music can be traced back to the 5th century, when Christianity spread in Carantania. Liturgical hymns (kyrie eleison) were introduced, and became the first plainchant to make a connection to the peoples' language.
During the medieval era, secular music was as popular as church music, including wandering minnesingers. Jurij Slatkonja, a Carniolan conductor and composer from Novo Mesto, became the director of the Vienna Boys' Choir in 1498. By the time of Protestant Reformation in the 16th century, music was used to proselytize in Carniola. The first Slovenian hymnal, Eni Psalmi, was published in 1567. This period saw the rise of Renaissance musicians like Jacobus Gallus. Italy was an important musical influence of the period, especially in sacred music, such as that of Antonio Tarsia (composer) of Koper, in oratorio and opera. A commedia was performed in Ljubljana in 1660, and an opera in 1700 in the family palace of the Auerspergs.