Beginner trouble with coding MIDI transpose function (actually more Arduino code

Thank you for the reply. I am using Arduino micro. Im aware about the included midi.h and software serial but they are there for later use once I have the project closer to the end, I thought I would leave it there and if I would run into any trouble it would show up earlier than when I actually try to implement "analog" midi to it. Maybe this is a bad idea and I should remove it? I included for the reason that the project will when complete be a full instrument with both USB midi and analog midi and built in samples all controlled from code. Your answer makes sense, now my code doesn't read the current root and note function when it sends the note? I think I need to read or learn some about the structure of a sketch. The array I use I stole from another midi library or example, maybe I would gain more from making the code from scratch for a better understanding? Thank you