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/8=160
M:6/8
K:D
['BAF B2 E', 'fef d2 B B2', 'G2 E', 'g fdB BAF |1 AFE D2 :|2']  
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
"^E dorian" d/c/ | B>cB BAF | B2 E EFA | B/c/dB BAF | AGE DFA |"^5" BcB BAF | B2 E E2 g | fdB BAF | 
 AFE D2 :| A |"^9" d2 d fef | d2 B B2 d | cde efd | ecA ABc |"^13" ded fef | d2 B B2 c | dcB BAF | 
 AFE D2 :| z |"^17" dfe dAF | B2 E EFA | dfd AGF | AGE D3 |"^21" dfe dAF | B2 E E2 g | fdB BAF | 
 AFE D2 :| F |"^25" GBA G2 E | G2 E E2 F | G/A/GF G2 E | F2 E D2 F |"^29" GBA G2 E | G2 E E2 g | 
 fdB BAF |1 AFE D2 :|2 AFD E3- | E6 |]  