It would also be useful to show your Processing program. It may be riddled with errors.
It would also be useful to show the output from Processing.
It would also be useful to show ALL of your Arduino code.
int receivedmsg = (Serial.read()); //programm
(Parentheses) (are) (good.) (Useless) (ones) (are) (not.)