A friend and I were building a project around the Pi and really wanted to use random midi devices (keyboard, drum pad, etc) to control the RPi. Think: smash a drum pad to make lights flash; turn a knob to control levels of something else; that sort of thing.
For various reasons, we couldn't / didn't want to connect these devices directly to the RPi, so the next solution was over the network. There is a well established protocol for MIDI over UDP, but I ended up not finding a decent implementation, so wrote my own library. Here it is:
While technically none of the library is RPi specific, that's what we're using it on and it's been working well. Here's a short setup tutorial with some screenshots.
Throwing this out there in case anyone has similar needs, I'm pretty happy with the result but would love any additional feedback or ideas. Enjoy!