Compose a musical piece utilizing the given motif as the foundation while maintaining the required musical form.
X:1
L:1/8
M:2/4
K:D
['d e2 A/ A/ ^G A E2']  
X:1
L:1/8
M:2/4
K:D
 d e2 A/ A/ | ^G A E2 | d B A ^G | E4 | d e2 A/ A/ | ^G A E2 | B A E D | A,4 |]  