> I'm trying to open a midi file in the following way, but I get an
> InvalidMidiDataException - why?
Well, the docs say that the IMDE is thrown when the stream/URL..
"..does not point to valid MIDI file data recognized by the system"
Note that just because the mid plays in WinAmp does not mean it
contains (all) valid data. Most of the MIDI players are made fairly
robust to handle the data that other music sequencers/editors liberally
refer to as MIDI.

Signature
Andrew Thompson
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane