bach's sonatas for violin and obbligato harpsichord were composed in trio sonata form, i.e. three independent parts consisting of two equally matched upper voices above a bass line. instead of playing the role of a continuo instrument, filling in the harmonies of a figured bass, the harpsichord took one of the upper melodic lines on equal terms with the violin, whilst also providing the bass line (which could be reinforced if desired by the addition of a viola da gamba).