In the Processing application, you have this statement:
val = port.read(); // read it and store it in val
It is reading, in the draw() function, which is called in an endless loop, the data that the Arduino sends using these statements:
Serial.print(analogRead(sensorPinx));
// print a tab between values:
Serial.print("\t");
Serial.print(analogRead(sensorPiny));
// print a tab between values:
Serial.print("\t");
Serial.print(analogRead(sensorPinz));
Serial.println();
That you can't make heads or tails of the data makes sense, since the data being sent by the Arduino is ascii data. If the accelerometers returned 175, 280, and 950, you are sending "175\t280\950\n\r" to the serial port, and reading '1', '7', '5', '\t', '2', '8', '0', '\t', '9', '5', '0', '\n, and '\r', and playing connect the dots with those values as though they were numbers.
I was able to bring in the data but I only see it visually in a moving "wave" pattern. This is great because I can visually see the activity of the accelerometer
Nope, sorry, not even close.
You will need to change the Processing application. There is a bufferUntil() method in the Arduino class that can be used to define when the serialEvent method is called. In that method, you need to read all the serial data:
String myString = myPort.readStringUntil('\n');
Then, parse the string, to get the x, y, and z values as strings, and convert the strings to ints:
int sensors[] = int(split(myString, '\t'));
The result is an array of ints that correspond to what the Arduino sent.
You need to be plotting these three values to see which ones might be interesting.
My doubt, though, is that none of them will be, since an accelerometer measures a change in velocity with respect to time, and you are throwing the time portion of the data away. All you have left is the instantaneous change in velocity. Whether that is useful, or not, for controlling the music, I don't know. It would certainly not be useful for controlling an airplane, as the sensor is really intended to.