Develop a piece of music by incorporating the provided motif and following the outlined musical structure represented by alphabet characters.
X:1
L:1/8
Q:1/8=160
M:9/8
K:D
['E2 A A2 B', 'g2 g edc']  
X:1
L:1/8
Q:1/8=160
M:9/8
K:D
"^E dorian" E2 A A2 B cBc | E2 F G2 A BAG |1 E2 A A2 B c2 d | efg dec BAG :|2 c2 c BdB GBd | 
 g2 g edc BAG |: a2 a efg afd | g2 g def gdB |1 a2 a efg afd | g2 g edc BAG :|2 a2 a faf ded | 
 g2 g edc BAG ||  