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
M:9/8
K:D
['BAG F2 F']  
X:1
L:1/8
M:9/8
K:D
 Ddd dAG FGE | Ddd dcB cde | def gec d2 B |1 ABc dAG FGE :|2 BAF dAF EFA ||[K:G] BEB BAG F2 F | 
 EBB BAF ABc | BEE BAG F2 F |1 DED FDF ABc :|2 DED BAF EFA ||  