Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:2/4
K:D
['D2 DE', 'd3/2 c/ d2 e2 d/e/d/c/ BA F2'  
X:1
L:1/8
M:2/4
K:D
|: A/ | D2 DE | FA B/c/d | F2 F>E | F/G/A Bd | D2 DE | F/G/A/F/ BA | B/c/d ec | d2 d3/2 :: c/ | 
 d2 e2 | d/e/d/c/ BA | F2 F/G/F/E/ | D[B,F] [B,B][A,A] | D2 D[CE]/D/ | F/G/A BA | Bd e/d/c | 
 d2 d3/2 :|  