Data Smoothing for MPU6050 - New Instrument for Musical Expression Project

Hi all

I'm currently working on a project for my final year at university and I have chosen to try and create a MIDI controller that interfaces with a VST plugin through Max MSP. The parameters of the VST are controlled through the movement of the MPU6050, for instance, the angle of the "roll" will increase or decrease the cutoff filters value. I am to use gesture mapping to teach the program certain gestures to perform certain tasks. This project involves a combination of gesture mapping within Max while data is streamed from the the sensor. (for anyone not aware of what Max is - it is a visual programming language for music and multimedia that allows third-party development of new routines.

At the moment I have been using the example MPU6050 library to output the data from the gyroscope and accelerometer and I am getting a stream of data, that is shown in the serial monitor. I have managed to calibrate it successfully by setting my offsets shown below:

mpu.setXGyroOffset(46);
mpu.setYGyroOffset(33);
mpu.setZGyroOffset(27);
mpu.setXAccelOffset(-1149);
mpu.setYAccelOffset(-1304);
mpu.setZAccelOffset(1595);

Now the data flow is far more accurate for my gyroscope data, however I'm still experiencing problems with the accelerometer data. The data is currently standing at around 0 for the X, Y and Z axis of my accelerometer but fluctuates enormous amounts.

I am struggling to obtain a smooth flow of data and the accelerometer data is extremely noisy. How do I go about implementing a way to smooth the data in this instance?

P.s. I'm not sure how to post my code as i'm a newbie here...

For informed help, please read and follow the directions in the "How to use this forum" post.