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:Amix
['e A/A/A ed cdec (d/c/B/A/) GB gBBa', 'aefd cdec'  
X:1
L:1/8
M:2/4
K:Amix
 e | A/A/A ed | cdec | (d/c/B/A/) GB | gBBa | A/A/A (ed) | cdec | dB^gB | aAA :: g | aefd | cdec | 
 (d/c/B/A/) GB | gBBg |1 aefd | cdec | dBgB | aAA :|2 afge | dBec | dB ^g(f/g/) | aAA |]  