Using the given motif as a foundation, craft a musical piece adhering to the outlined form.
X:1
L:1/8
M:2/4
K:D
['fA fg/f/ f/ee/', 'Bc d2 g2 e>e e/f/g/e/ d2- d2'  
X:1
L:1/8
M:2/4
K:D
 e/g/ | fA fg/f/ | f/ee/ ee/f/ | gf ga | f/g/f/e/ de/g/ | fA fg/f/ | f/ee/ ef/g/ | aa g/f/e/e/ | 
 d2- d :|[K:G] B>B Bc | d2 g2 | e>e e/f/g/e/ | d2- d2 | a>a ag | fe d2 | (3ddd b>a | 
 (3[Bg][Bg][Bg] [Bg] :|  