I had kuk's MIDI solution wired on a second hand Yamaha keyboard I bought, and was only able to receive a 144 note on signal every 4 or so seconds.
I was pretty sure it had to be the same reason, as the original poster also mentioned a Yamaha PSR series keyboard.
It turns out that Yamaha does kind of ignore MIDI standards.
No, it doesn't. Yahaha uses MIDI just fine. It means that your code is ignoring MIDI standards; in particular, it is failing to detect running status
which is part of the MIDI standard. Basically, if the status bytes would be the same as the status for the previous message, sending it is optional. So code which reads MIDI needs to keep the last-seen status around in a variable.
The signals I received on playing "C D E" for example were:
20 80 20 0
22 80 22 0
24 80 24 0
So the information about all the notes is being passed through, just not always starting with a 144 note on signal.
Yes, that is a compliant MIDI stream.
No idea why.
The reason why was mentioned in this thread, a couple of posts above yours
So my code ignores the 144 signals, but every time it detects a 0 signal, it adds the previously read byte to the output, as that one represents the note that has just been hit. This doesn't yet take velocity into account, a slightly more complex code is needed for that, but for me this was sufficient.
Hope this helps!
No, actually, it doesn't help. Firstly, it ignores the runing status, which is easily detected and saved. Secondly, it introduces unnecessary lag. Thirdly, as you say, it ignores velocity. Fourthly, the code ignores status so won't cope with other status messages being mixed in with the note stream.