Construct melodic segments by incorporating the provided motif with the designated musical pattern.
X:1
L:1/8
M:4/4
K:Amix
['ea a2', 'd ed c2 Ac BAGB BA A2'  
X:1
L:1/8
M:4/4
K:Amix
 cd | ea a2 eg g2 | ea a2 ABcd | ea a2 eg g2 | affe d :| ed | c2 Ac BAGB | BA A2 BAGB | ABcd edcd | 
 eage d2 :|  