Johann Joachim Quantz (1697–1773) spent the last three decades of his life at the Prussian court, where his sole duty was to supply flute music for Frederick the Great and to teach him; the king's private concerts at Sanssouci ran on this repertoire. Some three hundred concertos survive, most of them still in the Berlin manuscripts, written in a transitional idiom between late baroque and the galant, with the solo line placed to flatter a capable amateur. Quantz also wrote the 1752 treatise On Playing the Flute, which remains the main source on eighteenth-century wind practice.