 
    Nunchuck.update(); 
    
-   if ( !Nunchuck.getZButton() )
+   //Serial.print(Nunchuck . getRaw()->yStick);
+   //Serial.print(' ');
+   //Serial.println((int)volume);
+   
+   if ( Nunchuck.getZButton() )
    { 
-     bumpy_input = constrain(Nunchuck . getRoll(), -180, -1);
-     bumpy_input = map(-bumpy_input, 0, 180, 0, 800);
+     constrain_input = constrain(Nunchuck . getRoll(), -180, -1);
+     bumpy_input = map(-constrain_input, 0, 180, 0, 800);
+     constrain_input = constrain(-constrain_input, 0, 100);
+     volumeLeft = map(constrain_input, 0, 100, 0, 255);
      rollLeft = rollLAverage.next(bumpy_input);
-     bumpy_input = constrain(Nunchuck . getRoll(), 0, 180);
-     bumpy_input = map(bumpy_input, 0, 180, 0, 800);
+     constrain_input = constrain(Nunchuck . getRoll(), 0, 180);
+     bumpy_input = map(constrain_input, 0, 180, 0, 800);
+     constrain_input = constrain(constrain_input, 0, 100);
+     volumeRight = map(constrain_input, 0, 100, 0, 255);
      rollRight = rollRAverage.next(bumpy_input);
-     bumpy_input = constrain(Nunchuck . getPitch(), 100, 174);
-     bumpy_input = map(bumpy_input, 100, 174, 0, 800);
+     constrain_input = constrain(Nunchuck . getPitch(), 100, 130);
+     bumpy_input = map(constrain_input, 100, 174, 0, 800);
+     constrain_input = constrain(constrain_input, 100, 144);
+     volumePitch = map(constrain_input, 100, 144, 0, 150);
      pitch = pitchAverage.next(bumpy_input);
+     
+     constrain_input = constrain(Nunchuck . getRaw()->yStick, 31, 129);
+     bumpy_input = map(-constrain_input, -129, -31, 200, 1000);
+     yStick = yAverage.next(bumpy_input);     
 
-     aSin.setFreq(rollLeft);
+     aSin.setFreq(pitch);
      aTri.setFreq(rollRight);
-     aSaw.setFreq(pitch);
+     aSaw.setFreq(rollLeft);
      
      play = 1;
    }

  startMozzi(CONTROL_RATE); // set a control rate of 64 (powers of 2 please)
  
  // set the frequency
  aSin.setFreq(440);
  aTri.setFreq(440);
  aSaw.setFreq(440);
}

void updateControl(){

int xStick;
int yStick;

unsigned char volumeLeft;
unsigned char volumeRight;
unsigned char volumePitch;

int play = 0;

void setup(){
  uint8_t error;
  
  error = Nunchuck.begin ();
  
  //Serial.begin(19200);
  
  /*if ( error )
  {
