Construct a melodic piece using the designated alphabetic pattern and the provided musical theme.
X:1
L:1/8
Q:3/8=100
M:6/8
K:D
['DFA =c2 A def gag fed', 'd2 A dfa dfa agf ceg ceg']  
X:1
L:1/8
Q:3/8=100
M:6/8
K:D
 D | DFA =c2 A | def gag | fed cBA | GFG AFD | DFA =c2 A | def gag | fed dcB | Add d2 :: A | 
 dfa"^NB" dfa | dfa agf | ceg"^NB" ceg | ceg gfe | fef gfg | aga bag | fed dcB | Add d2 :|  