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:D
['fdfa fdfg aggf g2 gf eceg eceg']  
X:1
L:1/8
M:4/4
K:D
 f3 g fedB | A2 FA DAFA | BG G2 G3 B | AGFG F2 F2 | f3 g fedB | A2 FB AFA=c | BGBd cAce | 
 d2 e/d/c defg | fdfa fdfg | aggf g2 gf | eceg eceg | baa^g a2 a=g | fdfa fdfg | aggf g2 gf | 
 eceg eceg | fdec d2 A2 |]  