Construct melodic segments by incorporating the provided motif with the designated musical pattern.
X:1
L:1/8
M:2/4
K:C
['d d', '(3d e f g f'  
X:1
L:1/8
M:2/4
K:C
|: c (d/e/) d d | c B c2 | d d g g | (fe) (d2 :| d2) c e | d2 c e | d d (3c d e | d2 (3d e f | 
 g f e d | c2 (3d e f | g f d2 | !fermata!c4 |]  