I\'m trying to play midi within a browser, and have been using a Java Applet that works just fine on PCs. Its extremely unreliable on OSX, so I wrote a simple test case that
From mmj - Midi for java on Mac OS X:
Apple's java Midi implementation appears a bit half-hearted. It does not consider MIDI data with status bytes >= 0xF0 to be valid (i.e. does not work with sysex, MIDI clock, timecode etc.), ignores timestamps on Midi events, device names will default to only the port's name (without hints on the device this port belongs to) and there may be other things missing alike.
The situation on OS X seems dire re MIDI, though that API is offered as a replacement.
This appears to be a two part problem. I too could not send midi sysex's using a mid-2011 OSX 10.7.5 equipped iMac. I did find a workaround - first, I had to use the mmj jar and jnilib's and secondly I had to tell my code to use timestamps of -1 and NOT to use system.currentTimeMillis(). In my case I'm sending realtime sysex messages, thus a timestamp of -1 works for me. I don't know what timestamp to use if you're dealing with midi note on/off's etc. Perhaps the timestamp is milliseconds into the future? I don't know. But I do know that I had to use both mmj and take better control of my timestamps. After that, things work as expected.