The term 'trio' defines both a group of three instruments, or a composition for such a group. Pieces for ensembles of three instruments may be titled according to their form or genre, and sometimes be simply titled 'trios', such as 'piano trios' (pieces for violin, piano, and cello) or 'string trios' (violin, viola, and cello). Up until the 18th century, the word 'trio' was also used to refer to any composition for three unaccompanied lines, that could have been played by a single player. The term also applied to 'trio sonatas' which were sonatas for basso continuo and two melodic instruments (such as continuo +2 violins, or flute and violin). 'Trio' also defines a contrasting dance that appears in the middle of a main dance, such as a minuet or a bourée. This comes from the tradition of orchestrating this middle dances for a group of only three instruments in order to create contrast.