Serial MIDI and Arduino MIDI

Is there a difference between a sketch written for serial MIDI use (thru a 5 pin DIN) and USB (direct from arduino?

As long as to have a helper app like "hairless" running on your PC then the code can be the same.

However, if you are using an Arduino Pro micro then by using the MIDIUSB library you can make your Arduino simply look like a USB HID MIDI interface with no need for a helper app. This means you have to communicate MIDI messages slightly differently by using the calls and methods provided by that library.