Compose music with the following musical form, using the given motif as a basis.
X:1
L:1/8
M:4/4
K:G
['G2 GG G2 (BA) GABA GE(TED) EGGA', 'd2 (gd)'  
X:1
L:1/8
M:4/4
K:G
 (BA) |S G2 GG G2 (BA) | GABA GE(TED) | EGGA GABd | (3efg dB (TBA)AB | G2 GG G2 (BA) | 
 GABA GE(TED) | EGGA GABd | egdB (TBA) A2 || d2 (gd) edgd | d2 (gd) BAAB | d2 (gd) edef | 
{a} gedB (TBA)AB | d2 (gd) edgd | d2({a} gd) (TBA)AB | c2 cA (TBA)Bd | (3efg dB (TBA)ABS ||  