Develop a musical composition utilizing the presented motif and adhering to the required structure.
X:1
L:1/8
M:4/4
K:D
['fgfe dAFA dcde fe d2 efed cABc', 'd2 ce d2', 'B2 ^Ac'  
X:1
L:1/8
M:4/4
K:D
|: fgfe dAFA | dcde fe d2 | efed cABc | defg ^gaba | fgfe dAFA | dcde fe d2 | efed cABc |1 
 d2 ce d2 de :|2 d2 ce d2 =FE |:[K:Dmin] DEFG A=B^cd | ed^cd A2 BA | GABA GFE^C | DEFG ^GABA | 
 DEFG ^GA=B^c | dcde fe d2 | efed eA=B^c |1 d2 ce d2 FE :|2 d2 ce d2 d^c ||[K:Bmin] B^ABc dcBd | 
 cBdc B2 ^AB | cF^EF cF^EF | dF^EF dF^EF | B^ABc dcBd | cBdc B2 ^AB | cF^EF GFdc |1 B2 ^Ac B3 F :|2 
 B2 ^Ac B2 de ||  