Using the given motif as a foundation, craft a musical piece adhering to the outlined form.
X:1
L:1/4
Q:1/4=120
M:9/4
K:G
['g2 d e d c B A', 'B B'  
X:1
L:1/4
Q:1/4=120
M:9/4
K:G
 g2 d e d c B A G | g2 f e a2 f3 | g2 d e d c B A G | g2 f e a2 f3 || a2 d e f g B B B | 
 e2 d (c B2) A3 | B2 c d e/f/ g f d g | e3/2 f/ g a f3/2 (e/4f/4) g3 |]  