Scotland is internationally known for its traditional music, which remained vibrant throughout the 20th century and into the 21st, when many traditional forms worldwide lost popularity to pop music. In spite of emigration and a well-developed connection to music imported from the rest of Europe and the United States, the music of Scotland has kept many of its traditional aspects; indeed, it has itself influenced many forms of music.
Many outsiders associate Scottish folk music almost entirely with the Great Highland Bagpipe, which has indeed long played an important part in Scottish music. Although this particular form of bagpipe developed exclusively in Scotland, it is not the only Scottish bagpipe, and other bagpiping traditions remain across Europe. The earliest mention of bagpipes in Scotland dates to the 15th century although they are believed to have been introduced to Scotland as early as the 6th century by the Gaels of Ireland. The pìob mhór, or Great Highland Bagpipe, was originally associated with both hereditary piping families and professional pipers to various clan chiefs; later, pipes were adopted for use in other venues, including military marching. Piping clans included the Clan Henderson, MacArthurs, MacDonalds, McKays and, especially, the MacCrimmon, who were hereditary pipers to the Clan MacLeod.
Stringed instruments have been known in Scotland from at least the Iron Age; the first evidence of lyres outwith the Greco-Roman world were found on the Isle of Skye, dating from 2300 BC, making it Europe's oldest surviving stringed instrument.Bards, who acted as musicians, but also as poets, story tellers, historians, genealogists and lawyers, relying on an oral tradition that stretched back generations, were found in Scotland as well as Wales and Ireland. Often accompanying themselves on the harp, they can also be seen in records of the Scottish courts throughout the medieval period. Scottish church music from the later Middle Ages was increasingly influenced by continental developments, with figures like 13th-century musical theorist Simon Tailler studying in Paris, before returned to Scotland where he introduced several reforms of church music. Scottish collections of music like the 13th-century 'Wolfenbüttel 677', which is associated with St Andrews, contain mostly French compositions, but with some distinctive local styles. The captivity of James I in England from 1406 to 1423, where he earned a reputation as a poet and composer, may have led him to take English and continental styles and musicians back to the Scottish court on his release. In the late 15th century a series of Scottish musicians trained in the Netherlands before returning home, including John Broune, Thomas Inglis and John Fety, the last of whom became master of the song school in Aberdeen and then Edinburgh, introducing the new five-fingered organ playing technique. In 1501 James IV refounded the Chapel Royal within Stirling Castle, with a new and enlarged choir and it became the focus of Scottish liturgical music. Burgundian and English influences were probably reinforced when Henry VII's daughter Margaret Tudor married James IV in 1503. James V (1512–42) was a major patron of music. A talented lute player, he introduced French chansons and consorts of viols to his court and was patron to composers such as David Peebles (c. 1510–1579?).