Lise, do I understand the following correctly?:
When you connect the PK-5 to a keyboard using a DIN MIDI cable, the end of notes are always correctly received.
When you connect a keyboard to your Java program using your M-Audio USB MIDI interface, the end of notes are always correctly received.
When you connect the PK-5 to your Java program using your M-Audio USB MIDI interface, then end of notes are sometimes missing.
Question: When you examine the messages from your PK-5 in MIDI-OX, do the end of the notes always appear?
If yes, then maybe there is something about your Java code that causes it to miss messages if they are too close to the previous message.
If no, then maybe the USB MIDI interface might be faulty and dropping messages that are too close to the previous message. Perhaps test with another MIDI interface if you can.
Running Status
Geoff and everyone: Be aware that MIDI-OX can't see if Running Status is used because the Windows MIDI system adds any missing status bytes before MIDI-OX sees the messages. (For example, see this
running status post on the MIDI-OX user forum.)
Also, as Clemens Ladisch says, MIDI messages over USB must always contain a status byte, so when using USB, any missing status bytes were already added back by the USB MIDI interface before Windows even sees them.
I think that tracing the exact use of Running Status might be helpful if you think a USB MIDI interface is faulty and you need to confirm exactly how it is failing. But I suspect that trying to trace the exact use of Running Status might be a distraction for Lise's problem.
Velocity
Geoff pointed out the PK-5 manual says it can be set to a velocity range of 0 to 127, but I suspect this is a mistake and it should say 1 to 127. If the PK-5 really does let you start a note with velocity zero, then if you press a pedal very lightly, you might see two sequential Note On messages with velocity zero, one for the start of the note and one for the end of the note. But I can't figure out a way that could cause the the issue Lise is having: Lise's Java program is reporting notes that begin with velocities in the 120s, but sometimes not seeing the end of a note (a Note On message with velocity zero).