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
['e ed cd e4 B4 e3 f']  
X:1
L:1/8
M:2/4
K:D
"D" f3 e | ed cd |"E7" e4 | B4 |"A" e3 f |"A7" ec BA |"D" d4- | d3 f |"B7" f2 f2 | ^de fa | 
"Gdim" g2"F#dim" f2 |"E" e4 |"E7" f e2 d | B d2 f |"A" e4- |"A7" e4 |"D" f f2 e | ed cd |"E7" e4 | 
 B4 |"A" e3 f |"A7" ec BA |"D" d4- | d2 z |"D" dd"A7" ef |"D" df"A7" eA |"D" dd"A7" ef | 
"D" d2"A7" c2 |"Em" B e2 d |"A7" c>d ec |"D" d4- | d2 z2 |]  