Compose a tune that integrates the letter-based representation of the determined musical pattern and the given melodic idea.
X:1
L:1/8
M:4/4
K:G
['(B2 A2)', 'a g3/2 (b/4a/4) (g/4f/4e/4d/4c/4B/4c/4){c} g (dB)(AG) (FG){f}']  
X:1
L:1/8
M:4/4
K:G
 G>A | (BA)(cB) (dc)(BA) | (GB)(dg) g3 (f/e/) | (dB) (TAG) FG{f} e(d/c/) |{B} A4 z2 G>A | 
[M:4/4] (B2 A2) (c2 B2) (d2 c2) (B2 A2) | (G2 B2) d2 g2{g} f3 g | 
{fg} a3 g (f/4e/4)c3/2 (e/4d/4)c3/2 |{c} d4 :: a2 | (gf)(ed){ga} b3 a | 
 g3/2 (b/4a/4) (g/4f/4e/4d/4c/4B/4c/4){c} !fermata!B3 g | (dB)(AG) (FG){f} e(d/c/) | 
{B} A4 z (G>A) | (BA)(cB) (dc)(BA) | (GB)(d=f){f} !fermata!e2 z ^f | 
 (g<e) (d>e) (d/4c/4B3/2) (A/4G/4)F3/2 |{F} G4 :|  