Compose a tune that integrates the letter-based representation of the determined musical pattern and the given melodic idea.
X:1
L:1/8
Q:1/2=80
M:2/2
K:G
['GBdg d2 G2 c2 ec B4 BdBG', 'G4 d2 (3def d2 d2 efge d4', 'D4 (3gab (3gab d2 d2 dgdc Tc2']  
X:1
L:1/8
Q:1/2=80
M:2/2
K:G
 GBdg d2 G2 | c2 ec B4 | BdBG EcBA | G2 TF2 G4 :: d2 (3def d2 d2 | efge d4 | BdBG AB^cd | 
 F2 TE2 D4 :: (3gab (3gab d2 d2 | dgdc Tc2 B2 | (Bc/d/) BG EcBA | [dG]2 [fF]2 [gG]4 :|  