in the totality of bach's musical output, the instrumental sonatas written in trio sonata form are small in number. apart from the bwv 1014–1019, there are the six organ sonatas, bwv 525–530, the three sonatas for viola da gamba and harpsichord, bwv 1027–1029, and the three sonatas for flute and harpsichord, bwv 1030, bwv 1031 and bwv 1032. in each case the trio sonata texture derives from the compositional form and not the particular combination of instruments, which was partly a function of the musicians at bach's disposal. this is well illustrated by the first movement of the organ sonata bwv 528 which originated as the sinfonia starting the second part of the cantata, bwv 76, with oboe d'amore and viola da gamba as solo instruments; and likewise by the trio sonata for two flutes and continuo bwv 1039 and its alternative version for viola da gamba and obbligato harpsichord, bwv 1027.