Compose a tune that integrates the letter-based representation of the determined musical pattern and the given melodic idea.
X:1
L:1/16
Q:1/4=100
M:2/4
K:D
['defe dcdB A4 ABcd e2 ag', 'defe e2>d2 cdef g2>A2 ABcd e2ag']  
X:1
L:1/16
Q:1/4=100
M:2/4
K:D
"^Allegretto" A2 | d2 d2 defe | dcdB A4 | ABcd e2 ag | fgef d2A2 | d2d2 defe | dcdB A4 | 
 ABcd e2 ag | fgef d2 || A2 | defe e2>d2 | cdef g2>A2 | ABcd e2ag | fdec d2>A2 | defe e2>d2 | 
 cdef g2>A2 | ABcd e2ag | f2e2 d2 |]  