Using the given motif as a foundation, craft a musical piece adhering to the outlined form.
X:1
L:1/8
M:2/2
K:D
['dAFA GBAG FADF GBAG', 'D2 (cd) edcd efge fdde fgaf edcB'  
X:1
L:1/8
M:2/2
K:D
 (3(ABc) | dAFA GBAG | FADF GBAG | FAdf gfed | ce A2 A2 (Bc) | dAFA GBAG | FADF GBAG | FAdA BGEC | 
 D2 DD D2 :: (cd) | edcd efge | fdde fgaf | edcB Agfe | dcBc A2 (dc) | B>G (3.G.G.G BcdB | 
 A>F (3.F.F.F ABcA | BcdA BGEC | D2 DD D2 :|  