Question: What role did Nicholas Lanier play to the king Charles II of England?
Context: Charles II (29 May 1630 – 6 February 1685) was king of England, Scotland and Ireland.  He was king of Scotland from 1649 until his deposition in 1651, and king of England, Scotland and Ireland from the restoration of the monarchy in 1660 until his death. Eleanor "Nell" Gwyn (2 February 1650 – 14 November 1687; also spelled "Gwynn", "Gwynne") was a long-time mistress of King Charles II of England and Scotland.  Called "pretty, witty Nell" by Samuel Pepys, she has been regarded as a living embodiment of the spirit of Restoration England and has come to be considered a folk heroine, with a story echoing the rags-to-royalty tale of Cinderella.  She was the most famous Restoration actress and possessed a prodigious comic talent.  Gwyn had two sons by King Charles: Charles Beauclerk (1670–1726); and James Beauclerk (1671–1680). Jerome Lanier was an English musician, sackbut player, son of Nicholas Lanier the Elder, hence uncle of Nicholas Lanier, the artist-musician.  Jerome Lanier was appointed in 1599 musician to court of Elizabeth I as Musician in Ordinary on woodwinds and sackbut replacing Mark Anthony Bassano, a post he held until 1643. Baptised on 17 May 1762 in the church of All Saints in Chichester, he was the eldest surviving son of the Reverend William Webber (1724–1790), a canon of Chichester Cathedral.  The Canon's father, Robert Webber, was said to be an illegitimate son of Charles Lennox, 1st Duke of Richmond, himself an illegitimate son of King Charles II, while the Canon's mother was Mary Maybank, reputedly a descendant of Louise de Kérouaille, Duchess of Portsmouth, a mistress of King Charles II.  William's mother had less elevated but wholly legitimate origins, being Anne Smith (1731–1806), daughter of John Smith, a surgeon in Chichester, and his wife Sarah Buckenham.  Among his uncles were Rear-Admiral Charles Webber (1722–1783), nominal father of Lieutenant-General James Webber Smith, as well as the rector of West Stoke outside Chichester, the Reverend Charles Smith (1729–1803).  His younger brother, the Reverend James Webber (1772–1847), became Dean of Ripon. William Russell, Lord Russell (29 September 1639 – 21 July 1683), was an English politician.  He was a leading member of the Country Party, forerunners of the Whigs, who laid the groundwork opposition in the House of Commons of England to the concept of a reign of an openly Catholic King (James II) during the reign of King Charles II but ultimately resulted in his execution for treason, almost two years before King Charles died and James acceded to the throne. Love's Triumph Through Callipolis was the first masque performed at the Stuart Court during the reign of King Charles I, and the first in which a reigning monarch appeared.  The work was written by Ben Jonson, with costumes, sets, and stage effects designed by Inigo Jones, and music by Nicholas Lanier. The Dutch Gift of 1660 was a collection of 28 mostly Italian Renaissance paintings and 12 classical sculptures, along with a yacht, the "Mary", and furniture, which was presented to King Charles II of England by the States-General of the Netherlands in 1660.  In July 1660 Louis of Nassau arrived in London; his countrymen Simon van Hoorn, curator of the Athenaeum Illustre, Michiel van Gogh from Vlissingen and the (catholic) Joachim Ripperda arrived in November to negotiate the Act of Navigation and to present Charles II the Gift.  The collection was given to Charles II to mark his return to power in the English Restoration, before which Charles had spent many years in exile in Paris, Cologne, and the Spanish Netherlands, during the rule of the English Commonwealth.  It was intended to strengthen diplomatic relations between England and the Republic, but only a few years after the gift the two nations would be at war again in the Second Anglo-Dutch War of 1665–67. The Knights of the Royal Oak was an intended order of knighthood.  It was proposed in 1660 at the time of the restoration of Charles II of England, known as the English Restoration.  It was to be a reward to those Englishmen who faithfully & actively supported him during his exile in France.  The knights so created were to be called "Knights of the Royal Oak", and bestowed with a silver medal, on a ribbon, depicting the king in the Royal oak tree, a reference to the oak tree at Boscobel House, then called the "Oak of Boscobel", in which King Charles II hid to escape the Roundheads after the Battle of Worcester in 1651.  Men were selected from all the counties of England and Wales, with the number from each county being in proportion to the population.  William Dugdale in 1681 noted 687 names, each with a valuation of their estate in pounds per year.  The estates of 18 men were valued at more than £3,000 per year.  The names of the recipients are also listed in the baronetages, published in five volumes, 1741. Lovers Made Men, alternatively titled The Masque of Lethe or The Masque at Lord Hay's, was a Jacobean era masque, written by Ben Jonson, designed by Inigo Jones, and with music composed by Nicholas Lanier.  It was performed on Saturday 22 February 1617, and was significant in the development and acceptance of opera in seventeenth-century England. Nicholas Lanier, sometimes Laniere (baptised at Greenwich 10 September 1588 – 24 February 1666) was an English composer and musician; the first to hold the title of Master of the King's Music from 1625 to 1666, an honour given to musicians of great distinction.  He was the court musician, a composer and performer and Groom of the Chamber in the service of King Charles I and Charles II.  He was also a singer, lutenist, scenographer and painter.
Answer: He was the court musician, a composer and performer and Groom of the Chamber