Craft a musical piece that incorporates the given motif and follows the outlined structure.
X:1
L:1/8
M:4/4
K:C
['[M:6/8][K:D] .abc d EDE AFA dcB AFD', 'A def edB'  
X:1
L:1/8
M:4/4
K:C
[M:6/8][K:D] .abc d | EDE AFA | dcB AFD | B>EE EFA | B>EE E2 F | DED FDF | ABc dAF | A>DD DED | 
 A>FD D2 :: A | def edB | AFA d2 c | Bee g/f/ed | Bee e2 A | def edB | dAG FGE | DFA deg | 
 f>dd d2 :|  