play sound files with arduino

hi , i have tried to write a program in processing that reads the analog input values from the arduino (I have used the Sonia library in processing for sound playing). Something is wrong, and I don't understand what.

Arduino code:

#include <SimpleMessageSystem.h>
int b;
int c;
void setup()
{
Serial.begin(9600);

}

void loop()
{
b = analogRead(1)
if (b>10){
if (b<150){
c=1;
}else if (b<300){
c=2;
}else if (b<450){
c=3;
}else if (b<600){
c=4;
}else if (b<750){
c=5;
}else{
c=6;
}
serialWrite('A');
serialWrite(c);
serialWrite('B');
}

}

void readpins(){
b = analogRead(1);
}

Processing code:

import pitaru.sonia_v2_9.;
import processing.serial.
;

Serial port;
String portname = "tty.usbserial-151";
int baudrate = 9600;
int value, valueOld;
Sample sound1, sound2, sound3, sound4, sound5, sound6;
String buf="";

void setup() {
Sonia.start(this);
size(800,600);
port = new Serial(this, portname, baudrate);
println(port);
fill(50);
noStroke();
framerate(110);
sound1=new Sample("geluid1.wav");
sound2=new Sample("geluid2.wav");
sound3=new Sample("geluid3.wav");
sound4=new Sample("geluid4.wav");
sound5=new Sample("geluid5.wav");
sound6=new Sample("geluid6.wav");
valueOld = 0;
}
void serialEvent(int serial){
// if serial event is not a line break
if(serial!='A') {
// add event to buffer
if (serial>=0){
buf += char(serial);
}
}
else {
value = (buf); // we inverse the value by subtracting it from the maximum //}
buf="";

}
// println("LDR: "+value1);

}

void draw(){
if (value!=valueOld){
valueOld = value;
if (value==1){
sound1.play();
}
if (value==2){
sound2.play();
}
if (value==3){
sound3.play();
}
if (value==4){
sound4.play();
}
if (value==5){
sound5.play();
}
if (value==6){
sound6.play();
}
}
}

I hope someone can help me out! thanks a lot!