Compose a musical piece using the given motif and adhering to the outlined musical form.
X:1
L:1/8
M:4/4
K:Ddor
['a4 ageg f4 f2 ag e2 ef', '(d{ed)}^c d2'  
X:1
L:1/8
M:4/4
K:Ddor
 [ADA,]agb a4 | ageg f4 | f2 ag e2 ef | dfed ^c2 A2- | Aagb a4 | ageg f4 | f2 ag e2 ef | 
 dfe^c d4 :: A2 (d{ed)}^c d2 e2- | e2 (f{gf)}e f2 e^c | A2 (d{ed)}^c d2 eg | (f{gf)}ed^c d2 AF | 
 D2 (d{ed)}^c d2 e2- | e2 (f{gf)}e f2 e^c | A2 (d{ed)}^c d2 eg | (f{gf)}ed^c [dF]4 :|  