I did notice that I had a typo:

cNote_Es = 10

in the constants should be

cNote_As = 10

cheers,
Paul