Develop a musical piece incorporating the designated alphabet-based pattern and the supplied melodic theme.
X:1
L:1/8
Q:1/8=180
M:4/4
K:D
['AD (3FED', 'D2 fg afdf bgeg fgec dcBA Bdce', '']  
X:1
L:1/8
Q:1/8=180
M:4/4
K:D
 dB | AD (3FED AD (3FED | Adcd fedc | BE (3GFE BE (3GFE | Beed ceeg | fB (3dcB bB (3dcB | 
 fedc dbag | fgec dABG | FGEF D2 :| fg | afdf bgeg | fgec dcBA | Bdce dfeg | fa^gb a2 (3ABc | 
 defg afbg | fedc dbag | fedc dABG | FGEF D2 :|"^last time" FGEF D4- | D8 |]  