Generate music with the following musical form in terms and the given motif.
X:1
L:1/8
M:9/8
K:G
['BAG B/c/dB', 'd g3 edc Bcd gdB G/A/BA GB/^c/d'  
X:1
L:1/8
M:9/8
K:G
 B3 BAB c3 | BAG B/c/dB ABc | BAG B/c/dB c2 e |1 dBG GAF G2 A :|2 dBG GAF GB/^c/d || g3 ed=c Bcd | 
 ecA ABG A2 d | g3 edc Bcd | gdB G/A/BA GB/^c/d | g3 ed=c Bcd | ecA ABG A2 d | def gfe def | 
 g/a/bg agf ged ||  