Construct a piece of music using the designated motif as the basis, while ensuring the required form is followed.
X:1
L:1/8
M:4/4
K:D
['D>E F<B A<F D2', 'A>G F<d'  
X:1
L:1/8
M:4/4
K:D
|: D>E F<B A<F D2 | B,>E G/F/E/D/ C<A,A,>C | D>E F<B A<F D2 | B,>D C<A F<D D2 :| A>G F<d B<G G2 | 
 B>A ^G<e c<AA>B | A>G F<d B>A G<B | c>B B<a f<dd>B | A>G F<d B<G G2 | B>A ^G<e c<AA>c | 
 (3dAB (3cde (3fde (3fga | (3bag (3fed (3cBA (3GFE | D4 ||  