blinkm maxm and midi, programming advices needed!

I've deleted them for now but they were here for eventual troubleshooting :

void MyHandleNoteOn(byte channel, byte pitch, byte velocity) {
  digitalWrite(LED,HIGH);  //Turn LED on
  if (velocity == 1) {//A NOTE ON message with a velocity = 1is actualy a NOTE OFF
    digitalWrite(LED,LOW);//Turn LED off
    BlinkM_fadeToHSB(blinkm_addr, 0, 0, 0);
  }
  color = velocity*2+1; 
  BlinkM_fadeToHSB(blinkm_addr, color, saturation, intensity);

Serial.write(velocity);

}

and adding Serial.begin(38400) to the setup