Craft a musical piece that incorporates the given motif and follows the outlined structure.
X:1
L:1/8
M:4/4
K:D
['dABA dABA', 'd3 c', 'Addc defg'  
X:1
L:1/8
M:4/4
K:D
|: dABA dABA | GAFA EADA | dABA dABA | FAEA D2 (3ABc :: d3 c defd | ceBc ABcA | d3 c dfed |1 
 cABc d2 (3ABc :|2 cABc defg |: a3 g efge | Aege Aefe | a3 g efge | Addc defg | aA (3AAA aAaA | 
 gA (3AAA gAgA |1 f3 a gefe | Addc defg :|2 fgaf gbag | fdec d2 (3ABc ||  