Thank you kuk, you're probably right.
I tested this
void loop () {
if (Serial.available() > 0) {
incomingByte = Serial.read();
// wait for as status-byte, channel 1, note on or off
if (incomingByte== 144){ // note on
digitalWrite(statusLed, HIGH);
note=incomingByte;
velocity=incomingByte;
if (velocity==0){ // note off
digitalWrite(statusLed, LOW);
}
}
}
}
and still no result.
But it's perhaps not the best way to get the velocity ?
tep