Formulate melodies by adhering to the specified pattern and supplied motif.
X:1
L:1/16
M:2/4
K:D
['g4 f2e2', '(3ABc d2e2f2g2 a4 fgaf g4 efge f2ef'  
X:1
L:1/16
M:2/4
K:D
 (3def | g4 f2e2 |{g} f2ef d2ef | g4 f2e2 | f6 :: (3ABc | d2e2f2g2 | a4 fgaf | g4 efge | 
{g} f2ef d2f2 | e2df c2Bc | d6 :|  