I've posted some of the code I've been using for midi on an avr chip [atmega16]. It should work on other avr chips with little or no modification. I'd love it if others would test it out and and contribute.
I've included a little bit of info and some example code here: http://x37v.info/projects/microcontroller/avr-midi/
"It provides convenient functions for both sending and receiving most (if not all) of the message types specified by the midi spec. It also provides a function for making sure that one can safely send midi data during a midi merge. Finally it provides functions to pack and unpack 8 bit bytes into/out of 7 bit midi bytes, allowing for users to send and receive large chunks of data in system exclusive (SYSEX) messages. "
Soon I'll be posting a sysex based boot-loader I've written using this code.
Hopefully this code is useful to some of the nerds around here :)