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/2
K:D
['defg a2']  
X:1
L:1/8
M:2/2
K:D
|: fg |"D" afaf d2 ef |"A7" gege c2 ef | gfed cABc |1"D" defg a2 :|2"D" df"A7"ec"D" d2 :: AG | 
"D" FAdA FAdA |"G" GBdB GBdB |"A7" ABcd efec |1"D" defg a2 :|2"D" df"A7"ec"D" d2 :|  