Develop a musical composition based on the provided pattern of letters and incorporating the given motif within it.
X:1
L:1/8
Q:1/2=100
M:2/4
K:D
['A d3 f ecAc B2 dB AFDF', 'g fafd']  
X:1
L:1/8
Q:1/2=100
M:2/4
K:D
 A | d3 f | ecAc | B2 dB | AFDF | G2 BG | AF DF | GEDC | D3 :| g | fafd | ce a2 | Bd g2 | Ac f2 | 
 GB e2 | FAdf | gedc | d3 g | fafd | ceac | BdgB | AcfA | GBeG | FAdf | gedc | d3 |]  