Can a Mega send MIDI commands through its USB port?

Grumpy_Mike:
Rubbish, you don't. You can get decent ones for £5.00.

You have try send patch dump of all midi keyboard memory?
You see comments on Amazon store or others stores about 7 USD interfaces?...yes is ok if you play just notes, but if you try use also pitch bender you get a lots of fail messages...no words about sysex messages...
Need a fast opto-coupler if you dont want lost data or get latency...and this entry-level midi interface dont use em.

You say: "This is not a problem with the MIDI library, you must have something else wrong."

I reply: i have solved problem 1 hour ago when i see this library:

and now my Arduino Uno work in all 2 way PC-arduino-midi interface-midi keyboard and back...problem is that Midi Library receive data from PC (RX led flash) but not send none to midi interface/midi keyboard.
Probably with MIDI_CREATE_CUSTOM_INSTANCE can configure your hardware to work in all 2 direction?
But documentation about commands is very poor...i have try email to programmer but no reply...so bye bye
..and sorry for bad english