The answer is the binary form. It is a musical form in two connected pieces, both of which are typically recurrent. It is also a structure used to put together a dance. In music this is typically made as A-A-B-B. Binary form was prevalent throughout the Baroque era, frequently used to structure actions of keyboard sonatas.