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
['E2 EF', 'A2 d2']  
X:1
L:1/8
M:4/4
K:D
 d | BdAG FDDE | FDAD FDDd | BdAG FGAF |1 E2 EF G3 :|2 E2 EF G4 || d2 df a2 z2 | g2 fg eA A2 | 
 d2 df a2 fa | bfaf e2 ef | a2 fg fede | defd cB A2 | d2 ed d2 ag | faeg fd d |]  