I'd suggest checking out the Java MIDI libraries. I think it would be much easier to use Processing and use the Java MIDI libraries.
My guess is you are better off not using the Processing IDE, as I don't know if it lets you bring in outside libraries. Eclipse works fine though.
But, it does look like this guy made it pretty easy to do some basic MIDI functionality in Processing:
http://ruinwesen.com/blog?id=95