Compose a piece of music following the given alphabetical representation of the musical structure and the provided motif.
X:1
L:1/8
M:9/8
K:D
['a2 g fga def', 'd3 c2 d ecA gfe dcd faf', 'BGAB cBAG FDEF GABc']  
X:1
L:1/8
M:9/8
K:D
|: a2 g fga def | efg fed cBA | a2 g fga def | Bgf edc d3 :: c2 d ecA gfe | dcd faf e2 f | 
 gab agf edc | Bcd edA d3 :|[M:4/4][K:G] g3 d BGAB | cBAG FDEF | GABc dBed | cBAG FABc | 
 dBgd BGAB | cBAG FDEF | GABc dBec | BAGF G2 z2 | cBAG FGAc | BABc dBcd | edcB cBAG | FGAF DEFD | 
 GDGB ADAc | BGBd cGce | dgfg fedc | BdFA G2 z2 |]  