How do I flash MIDI firmware to Arduino Uno rev3?

Hansibassi:
I'm trying to flash the firmware with this command:

avrdude -p m328p -F -P /dev/cu.usbmodem621 -c avrisp -U flash:w:HIDUINO_MIDI.hex

So, you have flashed your main processor (ATmega328) with a hex code that was intended for the serial-to-USB processor (ATmega16U2).

from the page you linked to, the correct command for an 8U2 is

avrdude -p at90usb82 -F -P usb -c avrispmkii -U flash:w:HIDUINO_MIDI.hex -U lfuse:w:0xFF:m -U hfuse:w:0xD9:m -U efuse:w:0xF4:m -U lock:w:0x0F:m

Check your avrdude documentation for the correct -p flag for a 16U2. And, connect to the ICSP header for the 16U2, not the one for the 328.