Construct a melodic piece using the designated alphabetic pattern and the provided musical theme.
X:1
L:1/8
M:9/8
K:D
['d2 A', 'fed c2 A']  
X:1
L:1/8
M:9/8
K:D
 G | F/G/AF d2 A d2 A | B/c/dB AFD E2 G |"^5" F/G/AF d2 A d2 g | f/g/af edc d2 :| g | 
"^9" fdf gag fed | c2 A c/d/ee e2 g |"^13" fdf gag fed | c2 A B/c/dd d2 g |"^17" f2 d f/g/ag fed | 
 c2 A c/d/ee e2 g |"^21" fdf afa bag | fed ABc d3 |]  