Construct a musical piece by amalgamating the designated alphabetical representation and the supplied musical theme.
X:1
L:1/8
M:4/4
K:C
['g2 gd BGGB']  
X:1
L:1/8
M:4/4
K:C
[M:4/4][K:G] a e de e a D, c ue e a a Tub!p!aed!p! .ea ud be E, e ABC caged eaue accdgS .ee c ve!p! uefe(Ad f ud cae ab ude!p! ua A)[Q:1/8=180]"^A dorian" [AD]2 [AD]g fdec | 
 [AD]2 [AD]A BAGB | [AD]2 Ag fdef | g2 gd BGGB | [AE]2 [AE]g fdec | [AE]2 AA (3cBA GB | 
 [AE]2 Ag fdef | g2 gd BGGB |[K:D]"^A modal" eaaf gfed | cAeA cAeA | eaaf gfef | g2 gd BGGB | 
 eaaf (3agf ed | cAeA cAeA | afge fdef | g2 gd BGGB |"^last time" A8 |]  