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:2/4
K:G
['B A']  
X:1
L:1/8
M:2/4
K:G
 d2 B A | d2 B A | G G2 B | A4 | d2 B A | d2 B A | G G2 B | A4 | B A B G | A2 G2 |]  