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

The problem isn't particularly complicated but unfortunately I think your current starting point is a bit too complex for your current level of understanding. It's always difficult modifying code that you don't really understand.

It may be better initially to write a simple program which just sends a given note for each key/button.

When that's working you can add on transposition which is just getting a number via your up/down keys then adding that number to the note number you would have sent. You already have the code that does most of that.

When that's working you can look at adding other functions, perhaps a display to show what the current transpose and perhaps key name is. But the trick is to do it all a bit at at a time and completely understand the code in each stage.

But designing and writing an electronic musical instrument from scratch is something that is going to take a lot longer than 3 days. If you don't think it's worth it then that's your decision. Shame really, it sounds like an interesting project. What was the potentiometer going to be doing?

Steve