'midi in" project....

this morning I did this debugging program and I made a interesting discovery.
But still I can't explain :
when Arduino receive one note from my midi kboard (a roland SH101) arduino aknowledge receiving 3 bytes (led13) and reconize it as a note on message.
When I send 2 notes, Arduino says 5 bytes and reconize only one time the note on message (noteon; note#, velocity, note#,velocity)
is it standard procedure for midi note message : I guess so,
a program to command LEDs polyphonicaly may take care of this ie be able to command diodes as long as it as never receive another status message.
but still it is weird.

hmm, as far as i remember the code i put on the playground does take this into account. yes it seems to be a standard across all midi keyboards that i've tested, though i've never read anything official about it. it makes sense after all.

I find something on the net : A MIDI to RS232 adapter (electronic circuit)
if you look at the beguining of the program in C (?)
it is :setserial 31250, 8, 1, 0, 0 for the midi settings (8 bit, parity 1 I suppose)
how can we setup the serial port the same way ?

do you mean the serial port of your arduino? In that case Serial.begin(31250); is all you need. If you're talking about the serial port of your computer for debugging midi stuff, there is a ftdi-driver hack for windows (and linux??) described here in the forum, to allow uncommon baud rates. if you're on a mac, i can recommend "MIDI Monitor" to see what you're keyboard is sending. for debugging your arduino code your best off with a couple of LEDs as far as i can tell. or maybe try something like the software-serial library to use another pins than TX (1)for the debugging output.

best, kuk