Using ADXL335 accelerometer to control sound

I'm new to arduino and am using an uno, I want to use an accelerometer to control the pitch of a sound when it is tilted, I have so far managed to get a basic reading of the X,Y,Z values in serial monitor but am struggling to find out how to add sound, any help would be appreciated.

accelerometer_test.ino (958 Bytes)

What have you tried?

bethh:
I'm new to arduino and am using an uno, I want to use an accelerometer to control the pitch of a sound when it is tilted, I have so far managed to get a basic reading of the X,Y,Z values in serial monitor but am struggling to find out how to add sound, any help would be appreciated.

What is your sound source?

At the minute i'm using a piezo buzzer, but am looking at importing a sound file from something like processing maybe.