Do keep in mind that this is a very cumbersome process, because once you upload the MIDI firmware, you can no longer upload new sketches to the Arduino unless you restore the original firmware.
If it's within your budget, getting a board with native MIDI over USB support will be much more convenient.