Using the given motif as a foundation, craft a musical piece adhering to the outlined form.
X:1
L:1/8
M:4/4
K:D
['eg fg/f/ e2 A2 d>f a2 af', 'e<a f2 eA d>f a2 fa g/>f/e/>d/'  
X:1
L:1/8
M:4/4
K:D
 | eg fg/f/ e2 | A2 d>f a2 | af g/>f/e/>d/ c2 | B2 e>f g2 | gB cA d2 :| | e<a f2 eA | d>f a2 fa | 
 g/>f/e/>d/ c2 B2 | e>f g2 gB | cA d2 d2 :|  