Compose a musical piece utilizing the given motif as the foundation while maintaining the required musical form.
X:1
L:1/8
M:4/4
K:G
['D2 G2 GA B2 BB AGAB G2']  
X:1
L:1/8
M:4/4
K:G
 D2 | G2 GA B2 BB | AGAB G2 B2 | BABc d3 d | cBcd B2 d2 | Bddddccc | BBdB A3 D | BBcc d2 gc | 
 B2 A2 G2 |]  