Using the given motif as a foundation, craft a musical piece adhering to the outlined form.
X:1
L:1/8
M:6/8
K:D
['d2 B cBA dAF', 'E2 A d2 d fdf aba afe', 'E2 A def'  
X:1
L:1/8
M:6/8
K:D
 A | d2 B cBA | dAF FED | d2 B cBA | dAF E3 | def B3 | AdA F2 E | DED DEF | AFE E2 :| A | 
 d2 d fdf | aba afe | def afa | bge edB | def a2 a | bgb a2 g | fed dfe | dAF E2 :| A | def def | 
 dAF DFA | def def | dAF E2 A | def B3 | AdA F2 E | DED DEF | AFE E2 :|  