The trio sonata is a musical form which was particularly popular around the 17th century and the 18th century.
A trio sonata is written for two solo melodic instruments and basso continuo, making three parts in all, hence the name trio sonata. However, because the basso continuo is usually made up of at least two instruments (typically a cello or bass viol and a keyboard instrument such as the harpsichord), trio sonatas are typically performed by at least four musicians. The trio sonatas by Arcangelo Corelli (opus I, 1681, opus III, 1689) set an inspiring example.
Among the sonatas most directly influenced by Corelli are those of Henry Purcell, who partly modeled his also on those of another Roman, Lelio Colista, Georg Muffat and Georg Frederic Handel. Other composers show strongly divergent tendencies, among them particularly Heinrich Biber and Dietrich Buxtehude. Another group adjusted the Corelli model to the currents of late baroque music, among the most important being Tommaso Albinoni, Antonio Vivaldi, and Francesco Maria Veracini. Their works are characterized by an expansion and roundedness of form, an intensification of fugal writing in the allegros balanced by an increasing homophony in other movements, and many written-out embellishments formerly left to the player.
Several Frenchmen, notably François Couperin and Jean-Marie Leclair , combined the Corelli style with a native flair for simple melody, ever nourished by the air de dance and tastefully laced with trills and turns. The supreme eclectic was Johann Sebastian Bach, who in his many sonatas drew together the techniques of an international host of predecessors and contemporaries. In his sonatas and suites for unaccompanied violin and cello, the familiar and aging categories burn with a twilight glow as every difficulty of counterpoint and mechanical limitation of the instruments is pushed aside. Curiously Bach neglected the true trio-sonata, of which the only significant authentic example is that of the Musical Offering for transverse flute, violin, and bass.