Toward the end of the 17th century, two types of sonatas developed, the sonata da chiesa, and the sonata da camera. The form persisted into the 18th century. The last examples were written by Gluck and Handel. Thereafter it changed into the classical trio for three instruments, with a fully written out piano part.
The literature of the trio sonata includes most of the illustrious names of the late Baroque: Corelli, Purcell, Buxtehude, Handel, Couperin, Vivaldi and a few by Bach.