Construct melodic segments by incorporating the provided motif with the designated musical pattern.
X:1
L:1/8
M:2/2
K:D
['d2 AG FADF']  
X:1
L:1/8
M:2/2
K:D
 d2 AG FADF | G2 BG EFGA | d2 AG FADF | A d3 defe | d2 AG FADF | G2 =cG EFGA | d2 AG FADF | 
 Addc d4 | cdef g2 fg | a3 f g2 ed | cdef gedc | Addc d4 | cdef g2 fg | a3 f g2 fg | afge fdec | 
 Addc d4 |]  