Develop a musical piece using the given motif and adhere to the outlined structure.
X:1
L:1/8
M:6/8
K:Emin
['f2 e', "g2 a b2 c' bag"  
X:1
L:1/8
M:6/8
K:Emin
|: B2 d e2 f | g>ag f2 e | dBg f2 e | dBe E2 F | G>AG dBd | e/d/e/f/g/a/ f2 e | 
{e} d{c}B{A}G A>cB/A/ | GEE TE3 :| g2 a b2 c' | bag fed | Tgfe agf | bag fed | g2 a b2 c' | 
 bag f/g/e/f/d | (3g/a/g (3f/g/f/ e (3a/b/a/ (3g/a/g/ f | bag (3f/g/f/ (3e/f/e/ d | 
 Tbc'/b/a/g/ Tab/a/g/f/ | ga/g/f/e/ f/a/g/f/e/d/ | Tbc'/b/a/g/ Tab/a/g/f/ | 
 ga/g/f/e/ f/a/g/f/e/^d/ | eEE EFG | GAB B^c^d | eEE GAB | B>AB E3 |]  