Construct melodic segments by incorporating the provided motif with the designated musical pattern.
X:1
L:1/8
M:4/4
K:D
['d2 fd cdec defd A2 BA GB', 'fB B2 dcBc Aaag agfe'  
X:1
L:1/8
M:4/4
K:D
|: d2 fd cdec | defd A2 BA | GB B2 ABdf | gfed cdec | d2 fd cdec | defd A2 BA | GB B2 ABdB | 
 cdec d4 :: fB B2 dcBc | Aaag agfe | fB B2 dcBc | Aaag agfe | d2 fd c2 ec | B2 dB A2 BA | 
 GB B2 ABdB | cdec d4 :|  