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
['(3FED AD FDAD FAAF', 'd2 fd', 'B2 ec']  
X:1
L:1/8
M:4/4
K:D
 (3FED AD FDAD | FAAF GFEC | A,3 B, CA, (3A,A,A, | A,G,A,B, CDEG | (3FED AD FDAD | FAAF GFEA | 
 B2 eg fgec |1 dcce dBAG :|2 (3ded ce dfeg |: fB (3BBB fa^ge | fece f3 e | cAAc eA (3AAA | 
 A^GAB cdeg | fB (3BBB fa^ge | fece (3f^ga ec | ABce a3 e |1 faec dfeg :|2 faec B3 c |: 
 d2 fd Adfd | c2 ec Acec | d2 fd Adfg | gfed cABc | d2 fd Adfd | c2 ec Acec | dfaf gfed |1 
 B2 ec dcBc :|2 B2 ec dBAG || [FA]8 ||  