Compose a musical piece utilizing the given motif as the foundation while maintaining the required musical form.
X:1
L:1/8
Q:1/8=180
M:4/4
K:D
['edcB A2', 'd2 (fg) afaf dfaf bgbg efge afaf'  
X:1
L:1/8
Q:1/8=180
M:4/4
K:D
 (3(ABc) | dcdA FAdf | edcB A2 fg | afaf bagf | edcB A2 (fe) | dcdA FAdf | edcB A2 fg | 
 afdf (3(gag) ec | d2 f2 d2 :: (fg) | afaf dfaf | bgbg efge | afaf bagf | (3(efe) (3(dcB) A2 fe | 
 dcdA FAdf | edcB A2 (fg) | afdf (3(gag) ec | d2 f2 d2 :|  