Generalized source code used to upload to any Arduino board with USB capabilities. Dependent on the Arduino IDE MIDIUSB library.
This was used for an Arduino Leonardo but can also be used for a micro and other boards. Capable of being recognized as a MIDI controller through any music production software.
This prototype used the same code adjusted for 4 buttons and 1 potentiometer knob. The circuit diagram shows the basic layout which can be adjusted for any number of I/O pins