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

Let me clarify: Right now my project sends midi thru MIDIUSB library and im monitoring in MIDI monitor just for easier monitoring than thru a midi din jack output