Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/4
Q:1/4=100
M:3/4
K:D
['g f/e/']  
X:1
L:1/4
Q:1/4=100
M:3/4
K:D
 a | a2 g | f/e/ d{ga} b | a2 g | f/e/ d A | B g B | A f A | G G F | E2 | A |"^tr" A2 =c | 
 B/A/ G3/2 B/ | B2 d | c/B/ A a | a g f | e f g | f/e/ d c | d2 |]  