Construct a melodic piece using the designated alphabetic pattern and the provided musical theme.
X:1
L:1/8
M:2/4
K:D
['B/ A/']  
X:1
L:1/8
M:2/4
K:D
 A B/ A/ F2 | d f e f | A d B A | F E F2 | e d e2 | f e/ d/ A2 | d e/ d/ B/ A/ F | A4 |]  