Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['A4 B']  
X:1
L:1/8
M:4/4
K:D
 AdB A4 B | AB e6 | BABdee d2 | Ad B2 A4 | AB/d/B A4 B | B/d/Bed- d4 | BAA/B/ d3 B/d/B | A8 |]  