Compose a tune that integrates the letter-based representation of the determined musical pattern and the given melodic idea.
X:1
L:1/16
M:3/4
K:D
['A2>F2 DEFG AB=cA B2G2 G2B2 Bd^cd e2>c2', '[dD]8 [aA]2[AF]2 [AF]2[aA]2 agfa [gB]2[BG]2 [BG]2[gB]2 [gB]4']  
X:1
L:1/16
M:3/4
K:D
 A2>F2 DEFG AB=cA | B2G2 G2B2 Bd^cd | e2>c2 ABcd efge | f2>d2 d2f2 f2d2 | cdef gfga b2g2 | 
 fedc [dD]8 :: [aA]2[AF]2 [AF]2[aA]2 agfa | [gB]2[BG]2 [BG]2[gB]2 [gB]4 | e2>c2 ABcd efge | 
 f2>d2 d2f2 f2d2 | cdef gfga b2g2 | fedc [dD]8 :|  