Wow, thanks sooo much for that! I have spent a lot of time being confused over this.
I've put that code into a class member and everything is working perfectly now when I call it after a parameter change in the code.
The solution to the other issue is embarrassingly embarrassing......
I *cough* had an extra octave and *cough* no *cough* Es in any of them. There were 128 notes, but not in any format that anyone uses!!!
Top man!