MIDI Controller Poti+Buttons

...is not any kind of explanation of the issues you are observing.

Please remember to use code tags when posting code

(Your button sketch is still too large)