Court music in Scotland is all music associated with the Royal Court of Scotland, between its origins in the tenth century, until its effective dissolution in the seventeenth and eighteenth centuries with the Union of Crowns 1603 and Acts of Union 1707.
Sources for Ireland suggest that there would have been filidh in early Medieval Scotland, who acted as poets, musicians and historians, often attached to the court of a lord or king. At least from the accession of David I a less highly regarded order of bards took over their functions. They probably accompanied their poetry on the harp and harpists are recorded in the reign of Alexander III. James I may have introduced English and continental styles and musicians to the Scottish court. James III's founded a new large hexagonal Chapel Royal at Restalrig near Holyrood and lutenists began to appear in the royal household accounts from this point. James IV refounded the Chapel Royal within Stirling Castle and is said to be constantly accompanied by music.
Scotland followed the trend of Renaissance courts for instrumental accompaniment and playing. James V was a talented lute player and introduced French chansons and consorts of viols to his court. The outstanding Scottish composer of the first half of the sixteenth century was Robert Carver. The king's household contained two dozen musicians, including trumpeters, drummers and string players. The return of Mary, Queen of Scots from France in 1561 gave a new lease of life to the choir of the Chapel Royal. She brought French musical influences with her, employing lutenists and viol players in her household. James VI rebuilt the Chapel Royal at Stirling. He followed the tradition of employing lutenists for his private entertainment, as did other members of his family. When James VI went south to take the throne of England in 1603 as James I, he removed one of the major sources of patronage in Scotland. The Chapel Royal now began to fall into disrepair, and the court in Westminster would be the only major source of royal musical patronage. Holyrood Abbey was remodelled as a chapel for Charles I's royal visit in 1633, but musical worship in the palace came to an end after the chapel was sacked by a mob. Holyrood would be reclaimed by Charles II and became a centre of worship again during the future James VII's residency in the early 1680s, but was sacked by an anti-papist mob during the Glorious Revolution in 1688.
Middle Ages.
Early Medieval Scotland and Ireland shared a common culture and language. There are much fuller historical sources for Ireland, which suggest that there would have been filidh in Scotland, who acted as poets, musicians and historians, often attached to the court of a lord or king, and who passed on their knowledge and culture in Gaelic to the next generation. At least from the accession of David I (r. 1124–53), as part of a Davidian Revolution that introduced French culture and political systems, Gaelic ceased to be the main language of the royal court and was probably replaced by French. After this "de-gallicisation" of the Scottish court, a less highly regarded order of bards took over the functions of the filidh and they would continue to act in a similar role in the courts of lords in the Highlands and Islands into the eighteenth century. They probably accompanied their poetry on the harp. When Alexander III (r. 1249–86) met Edward I in England he was accompanied by a Master Elyas, described as "the king of Scotland's harper". The same accounts indicate that the Scottish king was also accompanied by trumpeters and other minstrels.
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. Walter Bower, abbot of Inchcolm praised him as "another Orpheus", including mastery of the organ, drum, flute and lyre. James II also demonstrated some musical ability. His marriage to Mary of Guelders, who had been educated in the Burgundian court, meant that she brought the latest ideas of music to the Scottish court.
The story of the execution of James III's favourites by his enemies, including the English musician William Roger, at Lauder Bridge in 1482, may indicate his interest in music. Renaissance monarchs often used chapels to impress visiting dignitaries. James III founded a new large hexagonal Chapel Royal at Restalrig near Holyrood that was probably designed for a large number of choristers. Lutenists began to appear in the royal household accounts from the reign of James III, with the earliest reference in 1474.
In 1501 his son James IV refounded the Chapel Royal within Stirling Castle, with a new and enlarged choir meant to emulate St. George's Chapel at Windsor Castle 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. No piece of music can be unequivocally identified with these chapels, but the survival of a Mass based on the Burgundian song "L'Homme armé" in the later "Carver Choirbook" may indicate that this was part of the Chapel Royal repertoire. James IV was said to be constantly accompanied by music, but very little surviving secular music can be unequivocally attributed to his court. An entry in the accounts of the Lord Treasurer of Scotland indicates that when James IV was at Stirling on 17 April 1497, there was a payment "to twa fithalaris [fiddlers] that sang Greysteil to the king, ixs". "Greysteil" was an epic romance and the music survives, having been placed in a collection of lute airs in the seventeenth century. In the early sixteenth century there are records of the monarch being entertained in their privy chambers by musicians, among them singers and other musicians including an English cornet player. James IV had stands of French and Italian musicians. His musicians also included the first recorded Africans in Scotland. He employed an African drummer, noted in his accounts as the "More taubronar", playing a drum called a "tabor". James IV employed a blind lutenist, and helped a lutenist called Jacob redeem his pawned lute in March 1500. The king was also a lute player, serenading his bride Margaret Tudor on their wedding night and she had learned to play the lute and clavichords.
Early Modern Era.
Scotland followed the trend of Renaissance courts for instrumental accompaniment and playing. James V was a talented lute player and introduced French chansons and consorts of viols to his court, although almost nothing of this secular chamber music survives. The first indication of the use of viols is an entry in the Treasurer's accounts for 1535 for the making of viols. By 1538 there were four viol players in the household, dressed in red and yellow liveries. They were led by Jacques Collumbell, who seems to have been brought to Scotland to train the newly formed consort. James V's household contained two dozen musicians, including trumpeters, drummers and string players. These included Thomas de Avarencia, whose services were begged from the Duke of Milan.
The outstanding Scottish composer of the first half of the sixteenth century was Robert Carver (c. 1488-1558), a canon of Scone Abbey. His complex polyphonic music could only have been performed by a large and highly trained choir such as the one employed in the Scottish Chapel Royal. James V was also a patron to figures including David Peebles (c. 1510–79?), whose best known work "Si quis diligit me" (text from John 14:23), is a motet for four voices. These were probably only two of many accomplished composers from this era, whose work has largely only survived in fragments. Also known to be active in this period is John Fethy (c. 1480-c. 1568), who introduced the new five-fingered organ playing technique to the country and was Precentor or Chanter of the Chapel Royal from 1545-66.
Regent Arran, who ruled from 1543 to 1554, employed trumpeters and four viol players, and was entertained by a fool called Robesoun. The return of Mary, Queen of Scots from France in 1561 to begin her personal reign, and her position as a Catholic, gave a new lease of life to the choir of the Chapel Royal, but the destruction of Scottish church organs meant that instrumentation to accompany the mass had to employ bands of musicians with trumpets, drums, fifes, bagpipes and tabors. Like her father she played the lute and virginals, while unlike her father she was a fine singer. She brought French musical influences with her, employing lutenists and viol players in her household. She sent Adrian Lefeau to France to buy lutes and viols.
Mary had a stand of musicians for singing part works. These included French, Italian and English musicians. Among these was David Rizzio, later her private secretary until his murder in 1566. Her marriage to Henry Stuart, Lord Darnley in 1565 has the first references to members of the English Hudson family, with at least five members, who would be violers and singers at the court of James VI. Other named musicians included Scotsman James Lauder (b. c. 1535), who had studied music in France and returned with the queen from France. He later served her in her imprisonment in England, as did his illegitimate son John Lauder, who played the bass viol.
James VI and the Union of the Crowns.
James VI (r. 1566-1625) was a major patron of the arts in general. In January 1580 the Hudson brothers performed in a masque at Holyrood Palace. The "Navigatioun" of Alexander Montgomerie was the spoken prologue. The masque involved the torchlit entrance at Holyrood Palace of the narrator and his companions, a "Turk, the More, and the Egyptien". The court musicians were bought "mask claithis" comprising red and yellow taffeta with swords and daggers. Montgomerie's prologue alludes to the Magi and Epiphany to flatter James VI as the Northern Star, and he was also characterised as Solomon. The masque was followed by dancing.
James VI inherited a number of musicians from his mother's court, including James Lauder and members of the Hudson family. Robert Hudson became treasurer of the Chapel Royal in 1587 before retiring to Dunfermline about 1593. Thomas Hudson was an important member of the Castalian Band of poets that gathered around the king and became Master of the Chapel Royal in 1586. William Hudson acted as the young king's dancing master in 1579, indicating that dance music like the pavan and galliards, common in the English Court, had reached Scotland. James Hudson moved on to being an envoy, travelling for the king to London and back. No music can be unequivocally attributed to the family, but several later pieces may be reworkings of their compositions.
He also employed trumpeters, and one was given new clothes to serve on the ship, the "James" that took him to Norway to meet his bride Anne of Denmark. William the English trumpeter was given a similar fine costume and a new trumpet in 1599 and sent to Denmark with a gift of hunting hounds. James and Anne participated in masques at courtiers' weddings, performing and dancing in costume. 
In 1594 James VI rebuilt the Chapel Royal at Stirling for state occasions like the baptism of his son Henry. He followed the tradition of employing lutenists for his private entertainment. Anne of Denmark employed an English lutenist John Norlie. 
When in 1603 James VI went south to take the throne of England as James I, an event known as the Union of the Crowns, he removed one of the major sources of patronage in Scotland. The Chapel Royal now began to fall into disrepair, and the court in Westminster would be the only major source of royal musical patronage. Holyrood Abbey was remodelled as a chapel for Charles I's royal visit in 1633. William Laud as Dean of the Chapel Royal attempted to impose the English liturgy on the chapel. The Director of the Scottish Chapel was ordered to London in 1630, where he spent five months copying out twelve part books. He returned to Scotland where he was able to report in 1631/32 that Holyrood was now served by 16 men, six boys and an organist. Members of the Scottish Council and