Craft a musical piece that incorporates the given motif and follows the outlined structure.
X:1
L:1/8
M:4/4
K:G
['B3 A A2 (BA) G2']  
X:1
L:1/8
M:4/4
K:G
 (B3/2 A/) | G3 E E2 (G3/2 A/) | B3 A A2 (BA) | G2 A2 B2 d2 | d4 B2 z c | B2 d2 e3 g | 
 B3 A A2 (BA) | G2 E2 E3 D | A3 (B/)c/ B2 ||  