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:D
['A>F DD/F/ AA/F/ DD dc/c/ dB BA', 'cc BB GG/B/ ff gg d2 d2']  
X:1
L:1/8
M:2/4
K:D
"D" A>F DD/F/ | AA/F/ DD |"G" dc/c/ dB |"D" BA A2 |"Bm" d/d/c/c/ dF |"A7" BA/A/"D" AD | 
"D7" F/F/E/F/ GF |"D" ED D2 |][K:Amin]"Am" AA/A/ AE | cc/c/"C" cG | ee/e/"Cm" gf/_e/"D7" d2 d2 || 
[K:Gmin]"Cm" ee/d/ cc/d/ | ee/e/"Gm" GG/A/ |"D7" BB/c/ BA |"Gm" G2 G2 || |"Gm" GG/B/"D7" cc | 
"Gm" BB GG/B/ |"F" ff gg |"Bb" d2 d2 |"Cm" cc/c/ cc |"Gm" GB de/d/ |"D7" cc/d/ BA |"Gm" G2 G2 |]  