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:D
['d3 B ABde f3 d edBA FAdB', 'd2 fd adfd (3efg fd edBA'  
X:1
L:1/8
M:4/4
K:D
 d3 B ABde | f3 d edBA | FAdB ADFD | EDEF DEFA :| d2 fd adfd | (3efg fd edBA | dB B2 ABdf | 
 edef dBAB d2 fd adfd | (3efg fd edBA | defg a2 bf | afec dgfe ||  