Here is a wrap of the JavaxMidi Library as a B4xLib. It is a large library and I haven't tested all of the available methods, it you get any problems let me know and I'll take a look. The code is in the b4xlib, but only supports B4j feel free to unzip it and use it as you wish. The example...
www.b4x.com