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:A
['(cd) e^def ecAc defg agaf eagf', 'defg agaf edcB']  
X:1
L:1/8
M:4/4
K:A
 (cd) | e^def ecAc | defg agaf | eagf ecAc | BABc B2 (cd) | e^def ecAc | defg agaf | eagf edcB | 
 A2 a2 A2 :: (AF) | EAAB cAec | FBBc dBfB | defg agaf | edcB AEFG | EAAB cAeA | BABc defg | 
 agaf edcB | A2 a2 A2 :|  