Compose a piece of music based on the provided motif and adhering to the outlined musical structure.
X:1
L:1/8
M:4/4
K:D
['DA,FD AFdA Bged cbag fedc', 'd2 (fg) a^gaf def=g afdd d2 (ef)'  
X:1
L:1/8
M:4/4
K:D
 (uFE) | DA,FD AFdA | Bged cbag | fedc Bged | (3(cdc) (3(BcB) AGFE | DA,FD AFdA | Bged cbag | 
 fedc Bgec | dcdc d2 :: (fg) | a^gaf def=g | afdd d2 (ef) | gfge cdef | (3(gag) (3(fgf) egfe | 
 dfec dDFA | Bged cbag | fedc Bgec | dcdc d2 :|  