Develop a musical piece using the given motif and adhere to the outlined structure.
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
['bag fed', 'd2 d'  
X:1
L:1/8
Q:1/8=160
M:6/8
K:D
"^A modal" A2 e e2 e | dBG BdB | GEE EAA | BGG Bdd | egg gaf | g3 g2 a | bag fed | bag fed | 
 BGB BGB | d3 e3 || GEE EAA | GEE GBB | d2 d dBG | dBG d2 d | e2 e eBe | dBd ege | dBG gBG | 
 A3 A3 |]  