Compose a musical piece using the designated musical pattern's alphabetic representation and the assigned melodic theme.
X:1
L:1/4
M:4/4
K:G
['D ^D E2 D2 A2 G2 z']  
X:1
L:1/4
M:4/4
K:G
 D ^D | E2 D2 | A2 G2 | z d- d ^d | e d c B | B2 A2 | ^D E- E2 | A4- | A2 |]  