Compose a musical piece in accordance with the outlined theme and structure.
X:1
L:1/8
M:4/4
K:D
['dB{c} (BA)', 'd2 (fd) adfd'  
X:1
L:1/8
M:4/4
K:D
|: dB{c} (BA) fB{c} (BA) | dB{c} (BA) f2 fe | d2 (cd) B2 A2 | ceAc e2 (fe) :: d2 (fd) adfd | 
 d2 fd f2{g} fe |1 d2 (fd) adfd | ceAc e2 (fe) :|2 defg abaf | ecAc e2 (fe) ||  