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
['AFEF D2']  
X:1
L:1/8
M:4/4
K:D
 A F3 AFEF | D F3 ABde | f3 d efdB | Adfd efdB | A F3 AFEF | D F3 ABde | f3 d efdB |1 
 AFEF D2 dB :|2 AFEF D2 de | f a3 bfaf | defd e2 de | f2 df efdB | Adfd efde | f a3 bfaf | 
 defd efde | f2 df efdB ||1 AFEF D2 de :|2 AFEF D2 dB |]  